@vibe-forge/client 0.7.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +16 -17
- package/dist/assets/{arc-DXs6SvQX.js → arc-BjI8Mzf5.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-h-xVkbzT.js → blockDiagram-c4efeb88-By4JL1RU.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-DEumwLCr.js → c4Diagram-c83219d4-frpxdNO6.js} +1 -1
- package/dist/assets/channel-Da5T54-_.js +1 -0
- package/dist/assets/{classDiagram-beda092f-Dh_6VL8e.js → classDiagram-beda092f-sGBIwOiO.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-D9hG_V5y.js → classDiagram-v2-2358418a-JfASkQqT.js} +1 -1
- package/dist/assets/clone-BfjbcwWs.js +1 -0
- package/dist/assets/{createText-1719965b-DGO5tdKk.js → createText-1719965b-C6SwHZ-r.js} +1 -1
- package/dist/assets/{edges-96097737-63FzeZDk.js → edges-96097737-z-Dp4FKF.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-jN2RzBTN.js → erDiagram-0228fc6a-5fIyCTtw.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-CvND0Kz-.js → flowDb-c6c81e3f-DuDOLffh.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-jtMtLi5z.js → flowDiagram-50d868cf-CqfJoZYm.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-B25RT9lb.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-Dic1wweO.js → flowchart-elk-definition-6af322e1-wpZusdN_.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-BLbYj7ru.js → ganttDiagram-a2739b55-aw70jAEI.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-Dm4ee53U.js → gitGraphDiagram-82fe8481-DhJVtfJF.js} +1 -1
- package/dist/assets/{graph-BnzAin3i.js → graph-Dp5XlF1F.js} +1 -1
- package/dist/assets/{index-5325376f-gU7GGRnq.js → index-5325376f-C7cRw1io.js} +1 -1
- package/dist/assets/{index-BRIfON-w.css → index-DHL1Qu5o.css} +1 -1
- package/dist/assets/index-DqioMim6.js +557 -0
- package/dist/assets/{infoDiagram-8eee0895-BI_1UH70.js → infoDiagram-8eee0895-B9VmKQm_.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-Xc6td0Nk.js → journeyDiagram-c64418c1-BTKwOAU-.js} +1 -1
- package/dist/assets/{layout-PHWoi3a3.js → layout-XtAsDaFY.js} +1 -1
- package/dist/assets/{line-BJPgSD92.js → line-1nd8Xc89.js} +1 -1
- package/dist/assets/{linear-DYKGy-mG.js → linear-BBztVBp6.js} +1 -1
- package/dist/assets/{mermaid.core-H3QJi-7A.js → mermaid.core-DaqQ11eY.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-UC--JAZa.js → mindmap-definition-8da855dc-DYdtyQbX.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-BTI_-cYX.js → pieDiagram-a8764435-CO9FnqSm.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-C4Gf_SaX.js → quadrantDiagram-1e28029f-Cs-iTCZ-.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-BKwfGAsO.js → requirementDiagram-08caed73-Diwrdq_y.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-DTp2p2pD.js → sankeyDiagram-a04cb91d-DjxNZwMs.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-CLuNEegU.js → sequenceDiagram-c5b8d532-CWawhoyM.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-BUofUUM6.js → stateDiagram-1ecb1508-Bow7IRrW.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-BATuZH_y.js → stateDiagram-v2-c2b004d7-BJqu9_Fj.js} +1 -1
- package/dist/assets/{styles-b4e223ce-CVO41uVV.js → styles-b4e223ce-F2FDTYdm.js} +1 -1
- package/dist/assets/{styles-ca3715f6-fFE_-gsH.js → styles-ca3715f6-DJITgKSs.js} +1 -1
- package/dist/assets/{styles-d45a18b0-BeG4Dd2L.js → styles-d45a18b0-DMSpafXP.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-D6PZVIuy.js → svgDrawCommon-b86b1483-3_yd3bB_.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-CTFMc2GO.js → timeline-definition-faaaa080-CV5umgp5.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-wWcw3yKn.js → xychartDiagram-f5964ef8-DhVTgtev.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -8
- package/src/App.tsx +1 -1
- package/src/api/base.ts +7 -7
- package/src/api/benchmark.ts +7 -3
- package/src/api/config.ts +2 -1
- package/src/api.ts +1 -1
- package/src/components/ArchiveView.tsx +1 -1
- package/src/components/ConfigView.tsx +18 -6
- package/src/components/MarkdownContent.tsx +1 -1
- package/src/components/Sidebar.tsx +2 -2
- package/src/components/automation-view/RuleFormPanel.tsx +7 -5
- package/src/components/automation-view/TaskList.tsx +8 -5
- package/src/components/automation-view/TriggerList.tsx +25 -15
- package/src/components/automation-view/types.ts +1 -1
- package/src/components/benchmark-view/BenchmarkCasePanel.tsx +94 -94
- package/src/components/benchmark-view/BenchmarkSidebar.scss +8 -6
- package/src/components/benchmark-view/BenchmarkSidebar.tsx +43 -30
- package/src/components/benchmark-view/index.tsx +4 -2
- package/src/components/benchmark-view/types.ts +3 -2
- package/src/components/benchmark-view/utils.ts +1 -2
- package/src/components/chat/ChatHeader.tsx +1 -1
- package/src/components/chat/ChatHistoryView.tsx +3 -2
- package/src/components/chat/CurrentTodoList.tsx +2 -3
- package/src/components/chat/messages/MessageItem.tsx +15 -14
- package/src/components/chat/messages/message-utils.ts +1 -1
- package/src/components/chat/sender/Sender.scss +8 -3
- package/src/components/chat/sender/Sender.tsx +71 -22
- package/src/components/chat/session-timeline-panel/git-graph.ts +8 -1
- package/src/components/chat/session-timeline-panel/index.scss +2 -2
- package/src/components/chat/tools/DefaultTool.tsx +3 -3
- package/src/components/chat/tools/adapter-claude/BashTool.tsx +2 -2
- package/src/components/chat/tools/adapter-claude/GlobTool.tsx +2 -2
- package/src/components/chat/tools/adapter-claude/GrepTool.tsx +2 -2
- package/src/components/chat/tools/adapter-claude/LSTool.tsx +4 -4
- package/src/components/chat/tools/adapter-claude/ReadTool.scss +1 -2
- package/src/components/chat/tools/adapter-claude/ReadTool.tsx +3 -3
- package/src/components/chat/tools/adapter-claude/TodoTool.tsx +1 -1
- package/src/components/chat/tools/adapter-claude/WriteTool.tsx +2 -2
- package/src/components/chat/tools/adapter-claude/components/FileList.scss +4 -2
- package/src/components/chat/tools/core/ToolCallBox.scss +34 -35
- package/src/components/chat/tools/core/ToolGroup.tsx +5 -5
- package/src/components/chat/tools/plugin-chrome-devtools/ChromeDevtoolsTool.tsx +1 -1
- package/src/components/chat/tools/task/GetTaskInfoTool.tsx +1 -1
- package/src/components/chat/tools/task/StartTasksTool.tsx +2 -2
- package/src/components/chat/tools/task/components/TaskRow.tsx +4 -4
- package/src/components/chat/tools/task/components/TaskToolCard.tsx +4 -4
- package/src/components/config/ConfigAboutSection.tsx +1 -1
- package/src/components/config/ConfigSectionForm.tsx +2 -1
- package/src/components/config/ConfigSectionPanel.tsx +1 -1
- package/src/components/config/ConfigShortcutInput.scss +1 -1
- package/src/components/config/ConfigSourceSwitch.tsx +1 -1
- package/src/components/config/configSchema.ts +16 -1
- package/src/components/config/index.tsx +1 -1
- package/src/components/config/record-editors/McpServersRecordEditor.tsx +125 -123
- package/src/components/config/record-editors/ModelServicesRecordEditor.tsx +138 -136
- package/src/components/config/record-editors/RecordJsonEditor.tsx +31 -29
- package/src/components/config/record-editors/index.tsx +1 -1
- package/src/components/knowledge-base/components/EmptyState.tsx +1 -1
- package/src/components/knowledge-base/components/EntitiesTab.tsx +2 -2
- package/src/components/knowledge-base/components/EntityItem.tsx +1 -1
- package/src/components/knowledge-base/components/EntityList.tsx +1 -1
- package/src/components/knowledge-base/components/FilterBar.tsx +2 -2
- package/src/components/knowledge-base/components/FlowsTab.tsx +1 -1
- package/src/components/knowledge-base/components/KnowledgeList.tsx +1 -1
- package/src/components/knowledge-base/components/MetaList.tsx +1 -1
- package/src/components/knowledge-base/components/RuleItem.tsx +1 -1
- package/src/components/knowledge-base/components/RuleList.tsx +1 -1
- package/src/components/knowledge-base/components/RulesTab.tsx +3 -3
- package/src/components/knowledge-base/components/SectionHeader.tsx +1 -1
- package/src/components/knowledge-base/components/SkillsTab.tsx +3 -3
- package/src/components/knowledge-base/components/SpecItem.tsx +1 -1
- package/src/components/knowledge-base/components/SpecList.tsx +1 -1
- package/src/components/knowledge-base/components/TabContent.tsx +1 -1
- package/src/components/knowledge-base/components/TabLabel.tsx +1 -1
- package/src/components/sidebar/SessionItem.scss +0 -1
- package/src/components/sidebar/SessionItem.tsx +1 -1
- package/src/hooks/chat/model-selector.ts +115 -121
- package/src/hooks/chat/use-chat-adapter.ts +3 -3
- package/src/hooks/chat/use-chat-interaction.ts +1 -1
- package/src/hooks/chat/use-chat-model-adapter-selection.tsx +549 -0
- package/src/hooks/chat/use-chat-models.tsx +7 -2
- package/src/hooks/chat/use-chat-permission-mode.ts +5 -1
- package/src/hooks/chat/use-chat-session-messages.ts +2 -2
- package/src/hooks/chat/use-chat-session.ts +14 -12
- package/src/hooks/chat/use-chat-view.ts +1 -1
- package/src/hooks/use-app-preferences.ts +14 -4
- package/src/hooks/use-session-subscription.ts +17 -6
- package/src/hooks/useQueryParams.ts +8 -6
- package/src/resources/adapters.ts +8 -2
- package/src/resources/locales/en.json +14 -1
- package/src/resources/locales/zh.json +14 -1
- package/src/routes/ChatRoute.scss +5 -1
- package/src/runtime-config.ts +17 -13
- package/src/utils/shortcutUtils.ts +1 -1
- package/vite.config.ts +5 -0
- package/dist/assets/channel-Hxo8SEEx.js +0 -1
- package/dist/assets/clone-Dd_kUYh5.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-CmztIxNZ.js +0 -1
- package/dist/assets/index-Cw-fkktx.js +0 -557
|
@@ -4,18 +4,28 @@ import { useEffect, useMemo } from 'react'
|
|
|
4
4
|
import { useTranslation } from 'react-i18next'
|
|
5
5
|
import useSWR from 'swr'
|
|
6
6
|
|
|
7
|
-
import type { ConfigResponse } from '@vibe-forge/
|
|
7
|
+
import type { ConfigResponse } from '@vibe-forge/types'
|
|
8
8
|
|
|
9
9
|
import { getConfig } from '#~/api'
|
|
10
10
|
import { themeAtom } from '#~/store'
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
interface AppPreferences {
|
|
13
|
+
isDarkMode: boolean
|
|
14
|
+
themeConfig: {
|
|
15
|
+
algorithm: typeof theme.darkAlgorithm | typeof theme.defaultAlgorithm
|
|
16
|
+
token: {
|
|
17
|
+
colorPrimary: string
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useAppPreferences(): AppPreferences {
|
|
13
23
|
const { i18n } = useTranslation()
|
|
14
24
|
const themeMode = useAtomValue(themeAtom)
|
|
15
25
|
const { data: configRes } = useSWR<ConfigResponse>('/api/config', getConfig)
|
|
16
26
|
const interfaceLanguage = configRes?.sources?.merged?.general?.interfaceLanguage
|
|
17
|
-
const isDarkMode = themeMode === 'dark'
|
|
18
|
-
|
|
27
|
+
const isDarkMode = themeMode === 'dark' ||
|
|
28
|
+
(themeMode === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
19
29
|
|
|
20
30
|
useEffect(() => {
|
|
21
31
|
document.documentElement.classList.toggle('dark', isDarkMode)
|
|
@@ -8,7 +8,15 @@ import { createSocket } from '#~/ws.js'
|
|
|
8
8
|
interface SessionListResponse {
|
|
9
9
|
sessions: Session[]
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
interface DeletedSessionUpdate {
|
|
12
|
+
id: string
|
|
13
|
+
isDeleted: boolean
|
|
14
|
+
}
|
|
15
|
+
type SessionUpdate = Session | DeletedSessionUpdate
|
|
16
|
+
|
|
17
|
+
const isDeletedSessionUpdate = (update: SessionUpdate): update is DeletedSessionUpdate => {
|
|
18
|
+
return 'isDeleted' in update && update.isDeleted
|
|
19
|
+
}
|
|
12
20
|
|
|
13
21
|
const sortSessions = (sessions: Session[]) => {
|
|
14
22
|
return [...sessions].sort((a, b) => {
|
|
@@ -25,16 +33,17 @@ const mergeSessionList = (
|
|
|
25
33
|
) => {
|
|
26
34
|
if (prev?.sessions == null) return prev
|
|
27
35
|
|
|
28
|
-
if (
|
|
36
|
+
if (isDeletedSessionUpdate(updatedSession)) {
|
|
29
37
|
return {
|
|
30
38
|
...prev,
|
|
31
39
|
sessions: prev.sessions.filter((session) => session.id !== updatedSession.id)
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
42
|
|
|
43
|
+
const session = updatedSession
|
|
35
44
|
const shouldInclude = filter === 'archived'
|
|
36
|
-
?
|
|
37
|
-
:
|
|
45
|
+
? session.isArchived === true
|
|
46
|
+
: session.isArchived !== true
|
|
38
47
|
const existing = prev.sessions.find((session) => session.id === updatedSession.id)
|
|
39
48
|
|
|
40
49
|
if (!shouldInclude) {
|
|
@@ -45,8 +54,10 @@ const mergeSessionList = (
|
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
const nextSessions = existing
|
|
48
|
-
? prev.sessions.map((
|
|
49
|
-
|
|
57
|
+
? prev.sessions.map((currentSession) =>
|
|
58
|
+
currentSession.id === updatedSession.id ? { ...currentSession, ...session } : currentSession
|
|
59
|
+
)
|
|
60
|
+
: [session, ...prev.sessions]
|
|
50
61
|
|
|
51
62
|
return {
|
|
52
63
|
...prev,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { useCallback, useMemo } from 'react'
|
|
2
2
|
import { useSearchParams } from 'react-router-dom'
|
|
3
3
|
|
|
4
|
-
type
|
|
5
|
-
|
|
4
|
+
type QueryParamKey<T> = Extract<keyof T, string>
|
|
5
|
+
|
|
6
|
+
interface QueryParamConfig<T extends Record<string, string>> {
|
|
7
|
+
keys: QueryParamKey<T>[]
|
|
6
8
|
defaults?: Partial<T>
|
|
7
|
-
omit?: Partial<Record<
|
|
9
|
+
omit?: Partial<Record<QueryParamKey<T>, (value: string) => boolean>>
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
export const useQueryParams = <T extends Record<string, string>>({
|
|
@@ -13,13 +15,13 @@ export const useQueryParams = <T extends Record<string, string>>({
|
|
|
13
15
|
omit
|
|
14
16
|
}: QueryParamConfig<T>) => {
|
|
15
17
|
const [searchParams, setSearchParams] = useSearchParams()
|
|
16
|
-
const keySet = useMemo(() => new Set(keys), [keys])
|
|
18
|
+
const keySet = useMemo(() => new Set<string>(keys), [keys])
|
|
17
19
|
|
|
18
20
|
const values = useMemo(() => {
|
|
19
21
|
return keys.reduce((acc, key) => {
|
|
20
22
|
const raw = searchParams.get(key)
|
|
21
23
|
const fallback = defaults?.[key] ?? ''
|
|
22
|
-
acc[key] = (raw ?? fallback) as T[
|
|
24
|
+
acc[key] = (raw ?? fallback) as T[QueryParamKey<T>]
|
|
23
25
|
return acc
|
|
24
26
|
}, {} as T)
|
|
25
27
|
}, [defaults, keys, searchParams])
|
|
@@ -29,7 +31,7 @@ export const useQueryParams = <T extends Record<string, string>>({
|
|
|
29
31
|
const merged = keys.reduce((acc, key) => {
|
|
30
32
|
const raw = searchParams.get(key)
|
|
31
33
|
const fallback = defaults?.[key] ?? ''
|
|
32
|
-
acc[key] = (raw ?? fallback) as T[
|
|
34
|
+
acc[key] = (raw ?? fallback) as T[QueryParamKey<T>]
|
|
33
35
|
return acc
|
|
34
36
|
}, {} as T)
|
|
35
37
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
adapterDisplayName as claudeCodeDisplayName,
|
|
3
|
+
adapterIcon as claudeCodeIcon
|
|
4
|
+
} from '@vibe-forge/adapter-claude-code/icon'
|
|
2
5
|
import { adapterDisplayName as codexDisplayName, adapterIcon as codexIcon } from '@vibe-forge/adapter-codex/icon'
|
|
3
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
adapterDisplayName as opencodeDisplayName,
|
|
8
|
+
adapterIcon as opencodeIcon
|
|
9
|
+
} from '@vibe-forge/adapter-opencode/icon'
|
|
4
10
|
|
|
5
11
|
export const adapterDisplayMap = {
|
|
6
12
|
'claude-code': {
|
|
@@ -313,6 +313,11 @@
|
|
|
313
313
|
"assetWarningsTitle": "Compatibility notes",
|
|
314
314
|
"assetWarningsCount": "{{count}} asset warnings",
|
|
315
315
|
"assetWarningsMore": "+{{count}} more",
|
|
316
|
+
"selectionWarningsTitle": "Model routing warnings",
|
|
317
|
+
"selectionWarningsCount": "{{count}} model warnings",
|
|
318
|
+
"selectionWarningReasonExcluded": "the model is excluded by adapter rules",
|
|
319
|
+
"selectionWarningReasonNotIncluded": "the model is not included by adapter rules",
|
|
320
|
+
"selectionWarningFallback": "Adapter {{adapter}} switched from {{requestedModel}} to {{resolvedModel}} because {{reason}}.",
|
|
316
321
|
"imageTooLarge": "Image must be smaller than 5MB",
|
|
317
322
|
"imageReadFailed": "Failed to read image",
|
|
318
323
|
"imageNotSupportedInInteraction": "Images are not supported for this interaction",
|
|
@@ -470,6 +475,7 @@
|
|
|
470
475
|
"addEnvVar": "Add Environment Variable",
|
|
471
476
|
"addHeader": "Add Header",
|
|
472
477
|
"addEntry": "Add Entry",
|
|
478
|
+
"newModelSelectorName": "New model selector",
|
|
473
479
|
"shortcutPlaceholder": "Press shortcut",
|
|
474
480
|
"clearShortcut": "Clear shortcut",
|
|
475
481
|
"newModelServiceName": "New model service name",
|
|
@@ -661,6 +667,12 @@
|
|
|
661
667
|
"desc": "Additional guidance for the assistant"
|
|
662
668
|
}
|
|
663
669
|
},
|
|
670
|
+
"models": {
|
|
671
|
+
"items": {
|
|
672
|
+
"label": "Model Selector Entries",
|
|
673
|
+
"desc": "Selector metadata keyed by `service` or `service,model`"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
664
676
|
"modelServices": {
|
|
665
677
|
"items": {
|
|
666
678
|
"label": "Service Entries",
|
|
@@ -708,7 +720,7 @@
|
|
|
708
720
|
"adapters": {
|
|
709
721
|
"items": {
|
|
710
722
|
"label": "Adapter Entries",
|
|
711
|
-
"desc": "Flattened configuration by adapter name"
|
|
723
|
+
"desc": "Flattened configuration by adapter name. Common fields include `defaultModel`, `includeModels`, and `excludeModels`."
|
|
712
724
|
}
|
|
713
725
|
},
|
|
714
726
|
"plugins": {
|
|
@@ -835,6 +847,7 @@
|
|
|
835
847
|
"sections": {
|
|
836
848
|
"general": "General",
|
|
837
849
|
"conversation": "Conversation",
|
|
850
|
+
"models": "Models",
|
|
838
851
|
"modelServices": "Model Services",
|
|
839
852
|
"channels": "Channels",
|
|
840
853
|
"adapters": "Adapters",
|
|
@@ -314,6 +314,11 @@
|
|
|
314
314
|
"assetWarningsTitle": "兼容性提示",
|
|
315
315
|
"assetWarningsCount": "{{count}} 个资产告警",
|
|
316
316
|
"assetWarningsMore": "还有 {{count}} 条",
|
|
317
|
+
"selectionWarningsTitle": "模型路由提示",
|
|
318
|
+
"selectionWarningsCount": "{{count}} 个模型告警",
|
|
319
|
+
"selectionWarningReasonExcluded": "该模型被适配器规则排除了",
|
|
320
|
+
"selectionWarningReasonNotIncluded": "该模型不在适配器允许列表中",
|
|
321
|
+
"selectionWarningFallback": "适配器 {{adapter}} 已将模型从 {{requestedModel}} 切换到 {{resolvedModel}},原因:{{reason}}。",
|
|
317
322
|
"imageTooLarge": "图片大小不能超过 5MB",
|
|
318
323
|
"imageReadFailed": "图片读取失败",
|
|
319
324
|
"imageNotSupportedInInteraction": "当前交互不支持图片",
|
|
@@ -471,6 +476,7 @@
|
|
|
471
476
|
"addEnvVar": "添加环境变量",
|
|
472
477
|
"addHeader": "添加请求头",
|
|
473
478
|
"addEntry": "添加条目",
|
|
479
|
+
"newModelSelectorName": "新增模型选择器",
|
|
474
480
|
"shortcutPlaceholder": "按下快捷键",
|
|
475
481
|
"clearShortcut": "清除快捷键",
|
|
476
482
|
"newModelServiceName": "新增模型服务名称",
|
|
@@ -662,6 +668,12 @@
|
|
|
662
668
|
"desc": "为对话提供额外的提示与约束"
|
|
663
669
|
}
|
|
664
670
|
},
|
|
671
|
+
"models": {
|
|
672
|
+
"items": {
|
|
673
|
+
"label": "模型选择器明细",
|
|
674
|
+
"desc": "按 `service` 或 `service,model` 选择器配置元信息"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
665
677
|
"modelServices": {
|
|
666
678
|
"items": {
|
|
667
679
|
"label": "服务明细",
|
|
@@ -709,7 +721,7 @@
|
|
|
709
721
|
"adapters": {
|
|
710
722
|
"items": {
|
|
711
723
|
"label": "适配器明细",
|
|
712
|
-
"desc": "
|
|
724
|
+
"desc": "按适配器名称平铺配置,公共字段包括 `defaultModel`、`includeModels` 和 `excludeModels`"
|
|
713
725
|
}
|
|
714
726
|
},
|
|
715
727
|
"plugins": {
|
|
@@ -836,6 +848,7 @@
|
|
|
836
848
|
"sections": {
|
|
837
849
|
"general": "通用",
|
|
838
850
|
"conversation": "会话",
|
|
851
|
+
"models": "模型选择器",
|
|
839
852
|
"modelServices": "模型服务",
|
|
840
853
|
"channels": "频道",
|
|
841
854
|
"adapters": "适配器",
|
|
@@ -59,7 +59,11 @@
|
|
|
59
59
|
padding: 8px 14px;
|
|
60
60
|
border: 1px solid rgba(59, 130, 246, .18);
|
|
61
61
|
border-radius: 999px;
|
|
62
|
-
background: linear-gradient(
|
|
62
|
+
background: linear-gradient(
|
|
63
|
+
135deg,
|
|
64
|
+
rgba(239, 246, 255, .92),
|
|
65
|
+
rgba(255, 255, 255, .96)
|
|
66
|
+
);
|
|
63
67
|
color: #2563eb;
|
|
64
68
|
font-size: 13px;
|
|
65
69
|
font-weight: 500;
|
package/src/runtime-config.ts
CHANGED
|
@@ -37,16 +37,20 @@ const normalizePath = (value?: string) => {
|
|
|
37
37
|
|
|
38
38
|
export const getRuntimeEnv = (): RuntimeEnv => getGlobalRuntimeEnv() ?? {}
|
|
39
39
|
|
|
40
|
-
export const getClientBase = () =>
|
|
41
|
-
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
export const getClientBase = () =>
|
|
41
|
+
normalizeBase(
|
|
42
|
+
getRuntimeEnv().__VF_PROJECT_AI_CLIENT_BASE__ ?? import.meta.env.__VF_PROJECT_AI_CLIENT_BASE__
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
export const getServerHostEnv = () =>
|
|
46
|
+
getRuntimeEnv().__VF_PROJECT_AI_SERVER_HOST__ ??
|
|
47
|
+
import.meta.env.__VF_PROJECT_AI_SERVER_HOST__
|
|
48
|
+
|
|
49
|
+
export const getServerPortEnv = () =>
|
|
50
|
+
getRuntimeEnv().__VF_PROJECT_AI_SERVER_PORT__ ??
|
|
51
|
+
import.meta.env.__VF_PROJECT_AI_SERVER_PORT__
|
|
52
|
+
|
|
53
|
+
export const getServerWsPath = () =>
|
|
54
|
+
normalizePath(
|
|
55
|
+
getRuntimeEnv().__VF_PROJECT_AI_SERVER_WS_PATH__ ?? import.meta.env.__VF_PROJECT_AI_SERVER_WS_PATH__
|
|
56
|
+
)
|
package/vite.config.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
|
|
3
4
|
import react from '@vitejs/plugin-react'
|
|
@@ -15,6 +16,10 @@ export default defineConfig({
|
|
|
15
16
|
root: '.',
|
|
16
17
|
base: clientBase,
|
|
17
18
|
resolve: {
|
|
19
|
+
alias: {
|
|
20
|
+
'@vibe-forge/utils/model-selection': fileURLToPath(new URL('../../packages/utils/src/model-selection.ts', import.meta.url)),
|
|
21
|
+
'@vibe-forge/utils': fileURLToPath(new URL('../../packages/utils/src/index.ts', import.meta.url))
|
|
22
|
+
},
|
|
18
23
|
conditions: ['browser', '__vibe-forge__', 'module', 'import', 'development']
|
|
19
24
|
},
|
|
20
25
|
server: {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{al as o,am as n}from"./mermaid.core-H3QJi-7A.js";const l=(a,r)=>o.lang.round(n.parse(a)[r]);export{l as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./graph-BnzAin3i.js";var a=4;function n(o){return r(o,a)}export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as o,p as e}from"./flowDb-c6c81e3f-CvND0Kz-.js";import{f as a,g as t}from"./styles-d45a18b0-BeG4Dd2L.js";import{ar as i}from"./mermaid.core-H3QJi-7A.js";import"./graph-BnzAin3i.js";import"./layout-PHWoi3a3.js";import"./index-Cw-fkktx.js";import"./index-5325376f-gU7GGRnq.js";import"./clone-Dd_kUYh5.js";import"./edges-96097737-63FzeZDk.js";import"./createText-1719965b-DGO5tdKk.js";import"./line-BJPgSD92.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-Hxo8SEEx.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};
|