mirror of https://github.com/chaitin/PandaWiki.git
Compare commits
8 Commits
79234c2394
...
fe2d70bfa9
| Author | SHA1 | Date |
|---|---|---|
|
|
fe2d70bfa9 | |
|
|
c9f3a61e86 | |
|
|
7b75f1bf55 | |
|
|
07646f0823 | |
|
|
63a8d8a743 | |
|
|
587c2842be | |
|
|
fd34bb4c55 | |
|
|
46afba778f |
|
|
@ -4516,9 +4516,6 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"auto_sitemap": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"body_code": {
|
"body_code": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -4806,9 +4803,6 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"auto_sitemap": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"body_code": {
|
"body_code": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4509,9 +4509,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"auto_sitemap": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"body_code": {
|
"body_code": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -4799,9 +4796,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"auto_sitemap": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"body_code": {
|
"body_code": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -420,8 +420,6 @@ definitions:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/definitions/domain.AIFeedbackSettings'
|
- $ref: '#/definitions/domain.AIFeedbackSettings'
|
||||||
description: AI feedback
|
description: AI feedback
|
||||||
auto_sitemap:
|
|
||||||
type: boolean
|
|
||||||
body_code:
|
body_code:
|
||||||
type: string
|
type: string
|
||||||
btns:
|
btns:
|
||||||
|
|
@ -601,8 +599,6 @@ definitions:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/definitions/domain.AIFeedbackSettings'
|
- $ref: '#/definitions/domain.AIFeedbackSettings'
|
||||||
description: AI feedback
|
description: AI feedback
|
||||||
auto_sitemap:
|
|
||||||
type: boolean
|
|
||||||
body_code:
|
body_code:
|
||||||
type: string
|
type: string
|
||||||
btns:
|
btns:
|
||||||
|
|
|
||||||
|
|
@ -96,9 +96,8 @@ type AppSettings struct {
|
||||||
RecommendQuestions []string `json:"recommend_questions,omitempty"`
|
RecommendQuestions []string `json:"recommend_questions,omitempty"`
|
||||||
RecommendNodeIDs []string `json:"recommend_node_ids,omitempty"`
|
RecommendNodeIDs []string `json:"recommend_node_ids,omitempty"`
|
||||||
// seo
|
// seo
|
||||||
Desc string `json:"desc,omitempty"`
|
Desc string `json:"desc,omitempty"`
|
||||||
Keyword string `json:"keyword,omitempty"`
|
Keyword string `json:"keyword,omitempty"`
|
||||||
AutoSitemap bool `json:"auto_sitemap,omitempty"`
|
|
||||||
// inject code
|
// inject code
|
||||||
HeadCode string `json:"head_code,omitempty"`
|
HeadCode string `json:"head_code,omitempty"`
|
||||||
BodyCode string `json:"body_code,omitempty"`
|
BodyCode string `json:"body_code,omitempty"`
|
||||||
|
|
@ -484,9 +483,8 @@ type AppSettingsResp struct {
|
||||||
RecommendQuestions []string `json:"recommend_questions,omitempty"`
|
RecommendQuestions []string `json:"recommend_questions,omitempty"`
|
||||||
RecommendNodeIDs []string `json:"recommend_node_ids,omitempty"`
|
RecommendNodeIDs []string `json:"recommend_node_ids,omitempty"`
|
||||||
// seo
|
// seo
|
||||||
Desc string `json:"desc,omitempty"`
|
Desc string `json:"desc,omitempty"`
|
||||||
Keyword string `json:"keyword,omitempty"`
|
Keyword string `json:"keyword,omitempty"`
|
||||||
AutoSitemap bool `json:"auto_sitemap,omitempty"`
|
|
||||||
// inject code
|
// inject code
|
||||||
HeadCode string `json:"head_code,omitempty"`
|
HeadCode string `json:"head_code,omitempty"`
|
||||||
BodyCode string `json:"body_code,omitempty"`
|
BodyCode string `json:"body_code,omitempty"`
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import (
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
|
|
||||||
"github.com/chaitin/panda-wiki/domain"
|
|
||||||
"github.com/chaitin/panda-wiki/handler"
|
"github.com/chaitin/panda-wiki/handler"
|
||||||
"github.com/chaitin/panda-wiki/log"
|
"github.com/chaitin/panda-wiki/log"
|
||||||
"github.com/chaitin/panda-wiki/usecase"
|
"github.com/chaitin/panda-wiki/usecase"
|
||||||
|
|
@ -37,13 +36,6 @@ func (h *ShareSitemapHandler) GetSitemap(c echo.Context) error {
|
||||||
if kbID == "" {
|
if kbID == "" {
|
||||||
return h.NewResponseWithError(c, "kb_id is required", nil)
|
return h.NewResponseWithError(c, "kb_id is required", nil)
|
||||||
}
|
}
|
||||||
appInfo, err := h.appUsecase.ShareGetWebAppInfo(c.Request().Context(), kbID, domain.GetAuthID(c))
|
|
||||||
if err != nil {
|
|
||||||
return h.NewResponseWithError(c, "web app not found", err)
|
|
||||||
}
|
|
||||||
if !appInfo.Settings.AutoSitemap {
|
|
||||||
return h.NewResponseWithError(c, "未开启自动生成站点地图功能", nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
xml, err := h.sitemapUsecase.GetSitemap(c.Request().Context(), kbID)
|
xml, err := h.sitemapUsecase.GetSitemap(c.Request().Context(), kbID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -341,12 +341,11 @@ func (r *KnowledgeBaseRepository) CreateKnowledgeBase(ctx context.Context, maxKB
|
||||||
Name: kb.Name,
|
Name: kb.Name,
|
||||||
Type: domain.AppTypeWeb,
|
Type: domain.AppTypeWeb,
|
||||||
Settings: domain.AppSettings{
|
Settings: domain.AppSettings{
|
||||||
Title: kb.Name,
|
Title: kb.Name,
|
||||||
Desc: kb.Name,
|
Desc: kb.Name,
|
||||||
Keyword: kb.Name,
|
Keyword: kb.Name,
|
||||||
AutoSitemap: true,
|
Icon: domain.DefaultPandaWikiIconB64,
|
||||||
Icon: domain.DefaultPandaWikiIconB64,
|
WelcomeStr: fmt.Sprintf("欢迎使用%s", kb.Name),
|
||||||
WelcomeStr: fmt.Sprintf("欢迎使用%s", kb.Name),
|
|
||||||
Btns: []any{
|
Btns: []any{
|
||||||
AppBtn{
|
AppBtn{
|
||||||
ID: uuid.New().String(),
|
ID: uuid.New().String(),
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,6 @@ func (u *AppUsecase) GetAppDetailByKBIDAndAppType(ctx context.Context, kbID stri
|
||||||
RecommendNodeIDs: app.Settings.RecommendNodeIDs,
|
RecommendNodeIDs: app.Settings.RecommendNodeIDs,
|
||||||
Desc: app.Settings.Desc,
|
Desc: app.Settings.Desc,
|
||||||
Keyword: app.Settings.Keyword,
|
Keyword: app.Settings.Keyword,
|
||||||
AutoSitemap: app.Settings.AutoSitemap,
|
|
||||||
HeadCode: app.Settings.HeadCode,
|
HeadCode: app.Settings.HeadCode,
|
||||||
BodyCode: app.Settings.BodyCode,
|
BodyCode: app.Settings.BodyCode,
|
||||||
// DingTalkBot
|
// DingTalkBot
|
||||||
|
|
@ -623,7 +622,6 @@ func (u *AppUsecase) ShareGetWebAppInfo(ctx context.Context, kbID string, authId
|
||||||
RecommendNodeIDs: app.Settings.RecommendNodeIDs,
|
RecommendNodeIDs: app.Settings.RecommendNodeIDs,
|
||||||
Desc: app.Settings.Desc,
|
Desc: app.Settings.Desc,
|
||||||
Keyword: app.Settings.Keyword,
|
Keyword: app.Settings.Keyword,
|
||||||
AutoSitemap: app.Settings.AutoSitemap,
|
|
||||||
HeadCode: app.Settings.HeadCode,
|
HeadCode: app.Settings.HeadCode,
|
||||||
BodyCode: app.Settings.BodyCode,
|
BodyCode: app.Settings.BodyCode,
|
||||||
// theme
|
// theme
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,6 @@ export type WelcomeSetting = {
|
||||||
export type SEOSetting = {
|
export type SEOSetting = {
|
||||||
keyword: string;
|
keyword: string;
|
||||||
desc: string;
|
desc: string;
|
||||||
auto_sitemap: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CustomCodeSetting = {
|
export type CustomCodeSetting = {
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ const Step1Model: React.FC<Step1ModelProps> = ({ ref }) => {
|
||||||
}, [modelList]);
|
}, [modelList]);
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
await modelConfigRef.current?.onSubmit?.();
|
||||||
// 检查模型模式设置
|
// 检查模型模式设置
|
||||||
try {
|
try {
|
||||||
const modeSetting = await getApiV1ModelModeSetting();
|
const modeSetting = await getApiV1ModelModeSetting();
|
||||||
|
|
@ -112,6 +113,7 @@ const Step1Model: React.FC<Step1ModelProps> = ({ ref }) => {
|
||||||
getModelList={getModelList}
|
getModelList={getModelList}
|
||||||
hideDocumentationHint={true}
|
hideDocumentationHint={true}
|
||||||
showTip={true}
|
showTip={true}
|
||||||
|
showSaveBtn={false}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ const ModelModal = lazy(() =>
|
||||||
export interface ModelConfigRef {
|
export interface ModelConfigRef {
|
||||||
getAutoConfigFormData: () => { apiKey: string; selectedModel: string } | null;
|
getAutoConfigFormData: () => { apiKey: string; selectedModel: string } | null;
|
||||||
handleClose: () => void;
|
handleClose: () => void;
|
||||||
|
onSubmit: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ModelConfigProps {
|
interface ModelConfigProps {
|
||||||
|
|
@ -57,6 +58,7 @@ interface ModelConfigProps {
|
||||||
autoSwitchToAutoMode?: boolean;
|
autoSwitchToAutoMode?: boolean;
|
||||||
hideDocumentationHint?: boolean;
|
hideDocumentationHint?: boolean;
|
||||||
showTip?: boolean;
|
showTip?: boolean;
|
||||||
|
showSaveBtn?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ModelConfig = forwardRef<ModelConfigRef, ModelConfigProps>(
|
const ModelConfig = forwardRef<ModelConfigRef, ModelConfigProps>(
|
||||||
|
|
@ -73,6 +75,7 @@ const ModelConfig = forwardRef<ModelConfigRef, ModelConfigProps>(
|
||||||
autoSwitchToAutoMode = false,
|
autoSwitchToAutoMode = false,
|
||||||
hideDocumentationHint = false,
|
hideDocumentationHint = false,
|
||||||
showTip = false,
|
showTip = false,
|
||||||
|
showSaveBtn = true,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const [autoConfigMode, setAutoConfigMode] = useState(false);
|
const [autoConfigMode, setAutoConfigMode] = useState(false);
|
||||||
|
|
@ -182,51 +185,58 @@ const ModelConfig = forwardRef<ModelConfigRef, ModelConfigProps>(
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
onSubmit: handleSave,
|
||||||
handleClose: handleCloseModal,
|
handleClose: handleCloseModal,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
setIsSaving(true);
|
if (tempMode !== savedMode || hasConfigChanged) {
|
||||||
try {
|
setIsSaving(true);
|
||||||
const requestData: {
|
try {
|
||||||
mode: 'auto' | 'manual';
|
const requestData: {
|
||||||
auto_mode_api_key?: string;
|
mode: 'auto' | 'manual';
|
||||||
chat_model?: string;
|
auto_mode_api_key?: string;
|
||||||
} = {
|
chat_model?: string;
|
||||||
mode: tempMode,
|
} = {
|
||||||
};
|
mode: tempMode,
|
||||||
|
};
|
||||||
|
|
||||||
// 如果是自动模式,获取用户输入的 API Key 和 model
|
// 如果是自动模式,获取用户输入的 API Key 和 model
|
||||||
if (tempMode === 'auto' && autoConfigRef.current) {
|
if (tempMode === 'auto' && autoConfigRef.current) {
|
||||||
const formData = autoConfigRef.current.getFormData();
|
const formData = autoConfigRef.current.getFormData();
|
||||||
if (formData) {
|
if (formData) {
|
||||||
requestData.auto_mode_api_key = formData.apiKey;
|
requestData.auto_mode_api_key = formData.apiKey;
|
||||||
requestData.chat_model = formData.selectedModel;
|
requestData.chat_model = formData.selectedModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
await postApiV1ModelSwitchMode(requestData);
|
await postApiV1ModelSwitchMode(requestData);
|
||||||
setSavedMode(tempMode);
|
setSavedMode(tempMode);
|
||||||
setAutoConfigMode(tempMode === 'auto');
|
setAutoConfigMode(tempMode === 'auto');
|
||||||
setHasConfigChanged(false); // 重置变更标记
|
setHasConfigChanged(false); // 重置变更标记
|
||||||
|
|
||||||
// 更新保存的初始值
|
// 更新保存的初始值
|
||||||
if (tempMode === 'auto' && autoConfigRef.current) {
|
if (tempMode === 'auto' && autoConfigRef.current) {
|
||||||
const formData = autoConfigRef.current.getFormData();
|
const formData = autoConfigRef.current.getFormData();
|
||||||
if (formData) {
|
if (formData) {
|
||||||
setInitialApiKey(formData.apiKey);
|
setInitialApiKey(formData.apiKey);
|
||||||
setInitialChatModel(formData.selectedModel);
|
setInitialChatModel(formData.selectedModel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
message.success(
|
if (showSaveBtn) {
|
||||||
tempMode === 'auto' ? '已切换为自动配置模式' : '已切换为手动配置模式',
|
message.success(
|
||||||
);
|
tempMode === 'auto'
|
||||||
getModelList(); // 刷新模型列表
|
? '已切换为自动配置模式'
|
||||||
} catch (err) {
|
: '已切换为手动配置模式',
|
||||||
console.error(err);
|
);
|
||||||
} finally {
|
}
|
||||||
setIsSaving(false);
|
getModelList(); // 刷新模型列表
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
} finally {
|
||||||
|
setIsSaving(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -310,7 +320,7 @@ const ModelConfig = forwardRef<ModelConfigRef, ModelConfigProps>(
|
||||||
/>
|
/>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</Box>
|
</Box>
|
||||||
{(tempMode !== savedMode || hasConfigChanged) && (
|
{(tempMode !== savedMode || hasConfigChanged) && showSaveBtn && (
|
||||||
<Button
|
<Button
|
||||||
variant='contained'
|
variant='contained'
|
||||||
size='small'
|
size='small'
|
||||||
|
|
|
||||||
|
|
@ -202,23 +202,32 @@ const Wrap = ({ detail: defaultDetail }: WrapProps) => {
|
||||||
onAiWritingGetSuggestion: handleAiWritingGetSuggestion,
|
onAiWritingGetSuggestion: handleAiWritingGetSuggestion,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const exportFile = (value: string, type: string) => {
|
||||||
|
if (!value) return;
|
||||||
|
const content = completeIncompleteLinks(value);
|
||||||
|
const blob = new Blob([content], { type: `text/${type}` });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = `${nodeDetail?.name}.${type}`;
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
message.success('导出成功');
|
||||||
|
};
|
||||||
|
|
||||||
const handleExport = useCallback(
|
const handleExport = useCallback(
|
||||||
async (type: string) => {
|
async (type: string) => {
|
||||||
if (editorRef) {
|
if (type === 'html') {
|
||||||
let value = nodeDetail?.content || '';
|
const value = editorRef.getHTML() || '';
|
||||||
if (!isMarkdown) {
|
exportFile(value, type);
|
||||||
value = editorRef.getContent() || '';
|
} else if (type === 'md') {
|
||||||
|
if (isMarkdown) {
|
||||||
|
let value = nodeDetail?.content || '';
|
||||||
|
exportFile(value, type);
|
||||||
|
} else if (editorRef) {
|
||||||
|
const value = editorRef.getMarkdown() || '';
|
||||||
|
exportFile(value, type);
|
||||||
}
|
}
|
||||||
if (!value) return;
|
|
||||||
const content = completeIncompleteLinks(value);
|
|
||||||
const blob = new Blob([content], { type: `text/${type}` });
|
|
||||||
const url = URL.createObjectURL(blob);
|
|
||||||
const a = document.createElement('a');
|
|
||||||
a.href = url;
|
|
||||||
a.download = `${nodeDetail?.name}.${type}`;
|
|
||||||
a.click();
|
|
||||||
URL.revokeObjectURL(url);
|
|
||||||
message.success('导出成功');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[editorRef, nodeDetail?.content, nodeDetail?.name, isMarkdown],
|
[editorRef, nodeDetail?.content, nodeDetail?.name, isMarkdown],
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ const CardMCP = ({ kb }: CardMCPProps) => {
|
||||||
is_enabled: false,
|
is_enabled: false,
|
||||||
access: 'open' as 'open' | 'auth',
|
access: 'open' as 'open' | 'auth',
|
||||||
token: '',
|
token: '',
|
||||||
tool_name: '',
|
tool_name: 'get_docs',
|
||||||
tool_desc: '',
|
tool_desc: '为解决用户的问题从知识库中检索文档',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ export enum ConstsSourceType {
|
||||||
SourceTypeDiscordBot = "discord_bot",
|
SourceTypeDiscordBot = "discord_bot",
|
||||||
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
||||||
SourceTypeOpenAIAPI = "openai_api",
|
SourceTypeOpenAIAPI = "openai_api",
|
||||||
|
SourceTypeMcpServer = "mcp_server",
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @format int32 */
|
/** @format int32 */
|
||||||
|
|
@ -591,7 +592,8 @@ export interface GetApiProV1AuthGetParams {
|
||||||
| "wechat_service_bot"
|
| "wechat_service_bot"
|
||||||
| "discord_bot"
|
| "discord_bot"
|
||||||
| "wechat_official_account"
|
| "wechat_official_account"
|
||||||
| "openai_api";
|
| "openai_api"
|
||||||
|
| "mcp_server";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeleteApiProV1AuthGroupDeleteParams {
|
export interface DeleteApiProV1AuthGroupDeleteParams {
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ export enum DomainAppType {
|
||||||
AppTypeOpenAIAPI = 9,
|
AppTypeOpenAIAPI = 9,
|
||||||
AppTypeWecomAIBot = 10,
|
AppTypeWecomAIBot = 10,
|
||||||
AppTypeLarkBot = 11,
|
AppTypeLarkBot = 11,
|
||||||
|
AppTypeMcpServer = 12,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConstsWatermarkSetting {
|
export enum ConstsWatermarkSetting {
|
||||||
|
|
@ -132,6 +133,7 @@ export enum ConstsSourceType {
|
||||||
SourceTypeDiscordBot = "discord_bot",
|
SourceTypeDiscordBot = "discord_bot",
|
||||||
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
||||||
SourceTypeOpenAIAPI = "openai_api",
|
SourceTypeOpenAIAPI = "openai_api",
|
||||||
|
SourceTypeMcpServer = "mcp_server",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConstsNodeRagInfoStatus {
|
export enum ConstsNodeRagInfoStatus {
|
||||||
|
|
@ -298,7 +300,6 @@ export interface DomainAppInfoResp {
|
||||||
export interface DomainAppSettings {
|
export interface DomainAppSettings {
|
||||||
/** AI feedback */
|
/** AI feedback */
|
||||||
ai_feedback_settings?: DomainAIFeedbackSettings;
|
ai_feedback_settings?: DomainAIFeedbackSettings;
|
||||||
auto_sitemap?: boolean;
|
|
||||||
body_code?: string;
|
body_code?: string;
|
||||||
btns?: unknown[];
|
btns?: unknown[];
|
||||||
/** catalog settings */
|
/** catalog settings */
|
||||||
|
|
@ -333,6 +334,8 @@ export interface DomainAppSettings {
|
||||||
keyword?: string;
|
keyword?: string;
|
||||||
/** LarkBot */
|
/** LarkBot */
|
||||||
lark_bot_settings?: DomainLarkBotSettings;
|
lark_bot_settings?: DomainLarkBotSettings;
|
||||||
|
/** MCP Server Settings */
|
||||||
|
mcp_server_settings?: DomainMCPServerSettings;
|
||||||
/** OpenAI API Bot settings */
|
/** OpenAI API Bot settings */
|
||||||
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
||||||
recommend_node_ids?: string[];
|
recommend_node_ids?: string[];
|
||||||
|
|
@ -384,7 +387,6 @@ export interface DomainAppSettings {
|
||||||
export interface DomainAppSettingsResp {
|
export interface DomainAppSettingsResp {
|
||||||
/** AI feedback */
|
/** AI feedback */
|
||||||
ai_feedback_settings?: DomainAIFeedbackSettings;
|
ai_feedback_settings?: DomainAIFeedbackSettings;
|
||||||
auto_sitemap?: boolean;
|
|
||||||
body_code?: string;
|
body_code?: string;
|
||||||
btns?: unknown[];
|
btns?: unknown[];
|
||||||
/** catalog settings */
|
/** catalog settings */
|
||||||
|
|
@ -419,6 +421,8 @@ export interface DomainAppSettingsResp {
|
||||||
keyword?: string;
|
keyword?: string;
|
||||||
/** LarkBot */
|
/** LarkBot */
|
||||||
lark_bot_settings?: DomainLarkBotSettings;
|
lark_bot_settings?: DomainLarkBotSettings;
|
||||||
|
/** MCP Server Settings */
|
||||||
|
mcp_server_settings?: DomainMCPServerSettings;
|
||||||
/** OpenAI API settings */
|
/** OpenAI API settings */
|
||||||
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
||||||
recommend_node_ids?: string[];
|
recommend_node_ids?: string[];
|
||||||
|
|
@ -926,6 +930,17 @@ export interface DomainLink {
|
||||||
url?: string;
|
url?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DomainMCPServerSettings {
|
||||||
|
docs_tool_settings?: DomainMCPToolSettings;
|
||||||
|
is_enabled?: boolean;
|
||||||
|
sample_auth?: DomainSimpleAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DomainMCPToolSettings {
|
||||||
|
desc?: string;
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type DomainMessageContent = Record<string, any>;
|
export type DomainMessageContent = Record<string, any>;
|
||||||
|
|
||||||
export interface DomainMetricsConfig {
|
export interface DomainMetricsConfig {
|
||||||
|
|
@ -1796,7 +1811,8 @@ export interface GetApiV1AuthGetParams {
|
||||||
| "wechat_service_bot"
|
| "wechat_service_bot"
|
||||||
| "discord_bot"
|
| "discord_bot"
|
||||||
| "wechat_official_account"
|
| "wechat_official_account"
|
||||||
| "openai_api";
|
| "openai_api"
|
||||||
|
| "mcp_server";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetApiV1CommentParams {
|
export interface GetApiV1CommentParams {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ export interface KBDetail {
|
||||||
recommend_node_ids: string[];
|
recommend_node_ids: string[];
|
||||||
desc: string;
|
desc: string;
|
||||||
keyword: string;
|
keyword: string;
|
||||||
auto_sitemap: boolean;
|
|
||||||
head_code: string;
|
head_code: string;
|
||||||
body_code: string;
|
body_code: string;
|
||||||
theme_mode?: 'light' | 'dark';
|
theme_mode?: 'light' | 'dark';
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ export enum ConstsSourceType {
|
||||||
SourceTypeDiscordBot = "discord_bot",
|
SourceTypeDiscordBot = "discord_bot",
|
||||||
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
||||||
SourceTypeOpenAIAPI = "openai_api",
|
SourceTypeOpenAIAPI = "openai_api",
|
||||||
|
SourceTypeMcpServer = "mcp_server",
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @format int32 */
|
/** @format int32 */
|
||||||
|
|
@ -591,7 +592,8 @@ export interface GetApiProV1AuthGetParams {
|
||||||
| "wechat_service_bot"
|
| "wechat_service_bot"
|
||||||
| "discord_bot"
|
| "discord_bot"
|
||||||
| "wechat_official_account"
|
| "wechat_official_account"
|
||||||
| "openai_api";
|
| "openai_api"
|
||||||
|
| "mcp_server";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeleteApiProV1AuthGroupDeleteParams {
|
export interface DeleteApiProV1AuthGroupDeleteParams {
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ export enum DomainAppType {
|
||||||
AppTypeOpenAIAPI = 9,
|
AppTypeOpenAIAPI = 9,
|
||||||
AppTypeWecomAIBot = 10,
|
AppTypeWecomAIBot = 10,
|
||||||
AppTypeLarkBot = 11,
|
AppTypeLarkBot = 11,
|
||||||
|
AppTypeMcpServer = 12,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConstsWatermarkSetting {
|
export enum ConstsWatermarkSetting {
|
||||||
|
|
@ -132,6 +133,7 @@ export enum ConstsSourceType {
|
||||||
SourceTypeDiscordBot = "discord_bot",
|
SourceTypeDiscordBot = "discord_bot",
|
||||||
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
SourceTypeWechatOfficialAccount = "wechat_official_account",
|
||||||
SourceTypeOpenAIAPI = "openai_api",
|
SourceTypeOpenAIAPI = "openai_api",
|
||||||
|
SourceTypeMcpServer = "mcp_server",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConstsNodeRagInfoStatus {
|
export enum ConstsNodeRagInfoStatus {
|
||||||
|
|
@ -298,7 +300,6 @@ export interface DomainAppInfoResp {
|
||||||
export interface DomainAppSettings {
|
export interface DomainAppSettings {
|
||||||
/** AI feedback */
|
/** AI feedback */
|
||||||
ai_feedback_settings?: DomainAIFeedbackSettings;
|
ai_feedback_settings?: DomainAIFeedbackSettings;
|
||||||
auto_sitemap?: boolean;
|
|
||||||
body_code?: string;
|
body_code?: string;
|
||||||
btns?: unknown[];
|
btns?: unknown[];
|
||||||
/** catalog settings */
|
/** catalog settings */
|
||||||
|
|
@ -333,6 +334,8 @@ export interface DomainAppSettings {
|
||||||
keyword?: string;
|
keyword?: string;
|
||||||
/** LarkBot */
|
/** LarkBot */
|
||||||
lark_bot_settings?: DomainLarkBotSettings;
|
lark_bot_settings?: DomainLarkBotSettings;
|
||||||
|
/** MCP Server Settings */
|
||||||
|
mcp_server_settings?: DomainMCPServerSettings;
|
||||||
/** OpenAI API Bot settings */
|
/** OpenAI API Bot settings */
|
||||||
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
||||||
recommend_node_ids?: string[];
|
recommend_node_ids?: string[];
|
||||||
|
|
@ -384,7 +387,6 @@ export interface DomainAppSettings {
|
||||||
export interface DomainAppSettingsResp {
|
export interface DomainAppSettingsResp {
|
||||||
/** AI feedback */
|
/** AI feedback */
|
||||||
ai_feedback_settings?: DomainAIFeedbackSettings;
|
ai_feedback_settings?: DomainAIFeedbackSettings;
|
||||||
auto_sitemap?: boolean;
|
|
||||||
body_code?: string;
|
body_code?: string;
|
||||||
btns?: unknown[];
|
btns?: unknown[];
|
||||||
/** catalog settings */
|
/** catalog settings */
|
||||||
|
|
@ -419,6 +421,8 @@ export interface DomainAppSettingsResp {
|
||||||
keyword?: string;
|
keyword?: string;
|
||||||
/** LarkBot */
|
/** LarkBot */
|
||||||
lark_bot_settings?: DomainLarkBotSettings;
|
lark_bot_settings?: DomainLarkBotSettings;
|
||||||
|
/** MCP Server Settings */
|
||||||
|
mcp_server_settings?: DomainMCPServerSettings;
|
||||||
/** OpenAI API settings */
|
/** OpenAI API settings */
|
||||||
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
openai_api_bot_settings?: DomainOpenAIAPIBotSettings;
|
||||||
recommend_node_ids?: string[];
|
recommend_node_ids?: string[];
|
||||||
|
|
@ -926,6 +930,17 @@ export interface DomainLink {
|
||||||
url?: string;
|
url?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DomainMCPServerSettings {
|
||||||
|
docs_tool_settings?: DomainMCPToolSettings;
|
||||||
|
is_enabled?: boolean;
|
||||||
|
sample_auth?: DomainSimpleAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DomainMCPToolSettings {
|
||||||
|
desc?: string;
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type DomainMessageContent = Record<string, any>;
|
export type DomainMessageContent = Record<string, any>;
|
||||||
|
|
||||||
export interface DomainMetricsConfig {
|
export interface DomainMetricsConfig {
|
||||||
|
|
@ -1796,7 +1811,8 @@ export interface GetApiV1AuthGetParams {
|
||||||
| "wechat_service_bot"
|
| "wechat_service_bot"
|
||||||
| "discord_bot"
|
| "discord_bot"
|
||||||
| "wechat_official_account"
|
| "wechat_official_account"
|
||||||
| "openai_api";
|
| "openai_api"
|
||||||
|
| "mcp_server";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetApiV1CommentParams {
|
export interface GetApiV1CommentParams {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"packageManager": "pnpm@10.12.1",
|
"packageManager": "pnpm@10.12.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ctzhian/tiptap": "^2.1.2",
|
"@ctzhian/tiptap": "^2.1.7",
|
||||||
"@ctzhian/ui": "^7.0.5",
|
"@ctzhian/ui": "^7.0.5",
|
||||||
"@emotion/react": "^11.14.0",
|
"@emotion/react": "^11.14.0",
|
||||||
"@emotion/styled": "^11.14.1",
|
"@emotion/styled": "^11.14.1",
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ importers:
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ctzhian/tiptap':
|
'@ctzhian/tiptap':
|
||||||
specifier: ^2.1.2
|
specifier: ^2.1.7
|
||||||
version: 2.1.2(474df993ec7b9e2d073b831f21aaac02)
|
version: 2.1.7(474df993ec7b9e2d073b831f21aaac02)
|
||||||
'@ctzhian/ui':
|
'@ctzhian/ui':
|
||||||
specifier: ^7.0.5
|
specifier: ^7.0.5
|
||||||
version: 7.0.5(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@mui/icons-material@7.3.4(@mui/material@7.3.4(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@mui/material@7.3.4(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/utils@7.3.3(@types/react@19.2.2)(react@19.2.0))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)
|
version: 7.0.5(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@mui/icons-material@7.3.4(@mui/material@7.3.4(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@mui/material@7.3.4(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(@mui/utils@7.3.3(@types/react@19.2.2)(react@19.2.0))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)
|
||||||
|
|
@ -523,8 +523,8 @@ packages:
|
||||||
react: '>=16.9.0'
|
react: '>=16.9.0'
|
||||||
react-dom: '>=16.9.0'
|
react-dom: '>=16.9.0'
|
||||||
|
|
||||||
'@ctzhian/tiptap@2.1.2':
|
'@ctzhian/tiptap@2.1.7':
|
||||||
resolution: {integrity: sha512-GXfJJV8ExkvTzmbOB20s2G3Hoy6SIecJlr79mDJd2Stw5LQjN0BAQBJTFnk13yCkspOTy+agHTzoWm2T+UtWOA==}
|
resolution: {integrity: sha512-qfZiG61W1wMK2CnC0dlVIiP5gVpjVBk8rcuE4h9KVpCvJ3PoSu9Xmu8wX5/X7LVhNamCKk9SgkQfGVh+z65iag==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@emotion/react': ^11
|
'@emotion/react': ^11
|
||||||
'@emotion/styled': ^11
|
'@emotion/styled': ^11
|
||||||
|
|
@ -6156,7 +6156,7 @@ snapshots:
|
||||||
- react-native
|
- react-native
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
'@ctzhian/tiptap@2.1.2(474df993ec7b9e2d073b831f21aaac02)':
|
'@ctzhian/tiptap@2.1.7(474df993ec7b9e2d073b831f21aaac02)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emotion/react': 11.14.0(@types/react@19.2.2)(react@19.2.0)
|
'@emotion/react': 11.14.0(@types/react@19.2.2)(react@19.2.0)
|
||||||
'@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0)
|
'@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.2.2)(react@19.2.0))(@types/react@19.2.2)(react@19.2.0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue