@vibe-forge/client 0.7.3 → 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-3Inn4weF.js → arc-BjI8Mzf5.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-CDUTPZC5.js → blockDiagram-c4efeb88-By4JL1RU.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-C6HJlK_i.js → c4Diagram-c83219d4-frpxdNO6.js} +1 -1
- package/dist/assets/channel-Da5T54-_.js +1 -0
- package/dist/assets/{classDiagram-beda092f-BbTSEeM-.js → classDiagram-beda092f-sGBIwOiO.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-XUN9iLKI.js → classDiagram-v2-2358418a-JfASkQqT.js} +1 -1
- package/dist/assets/clone-BfjbcwWs.js +1 -0
- package/dist/assets/{createText-1719965b-DPPzBI6W.js → createText-1719965b-C6SwHZ-r.js} +1 -1
- package/dist/assets/{edges-96097737-B2PDevbO.js → edges-96097737-z-Dp4FKF.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-CDx-zkVG.js → erDiagram-0228fc6a-5fIyCTtw.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-AXQhNDwJ.js → flowDb-c6c81e3f-DuDOLffh.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-DIFzlLzz.js → flowDiagram-50d868cf-CqfJoZYm.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-B25RT9lb.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-CBunCaHi.js → flowchart-elk-definition-6af322e1-wpZusdN_.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-DPMS1mgp.js → ganttDiagram-a2739b55-aw70jAEI.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-lsQFHHkQ.js → gitGraphDiagram-82fe8481-DhJVtfJF.js} +1 -1
- package/dist/assets/{graph-BlL8UTXV.js → graph-Dp5XlF1F.js} +1 -1
- package/dist/assets/{index-5325376f-D5mAuW3d.js → index-5325376f-C7cRw1io.js} +1 -1
- package/dist/assets/{index-fcJ9v94I.css → index-DHL1Qu5o.css} +1 -1
- package/dist/assets/index-DqioMim6.js +557 -0
- package/dist/assets/{infoDiagram-8eee0895-CQ5qoRoz.js → infoDiagram-8eee0895-B9VmKQm_.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-COrg8_ZP.js → journeyDiagram-c64418c1-BTKwOAU-.js} +1 -1
- package/dist/assets/{layout-DjdlpleO.js → layout-XtAsDaFY.js} +1 -1
- package/dist/assets/{line-DC6oQAQt.js → line-1nd8Xc89.js} +1 -1
- package/dist/assets/{linear-CRrvE1Sj.js → linear-BBztVBp6.js} +1 -1
- package/dist/assets/{mermaid.core-Chovhfjq.js → mermaid.core-DaqQ11eY.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-CGLpitPv.js → mindmap-definition-8da855dc-DYdtyQbX.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-BuuRwI2Y.js → pieDiagram-a8764435-CO9FnqSm.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-3Aap76t1.js → quadrantDiagram-1e28029f-Cs-iTCZ-.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-IN9gT6dQ.js → requirementDiagram-08caed73-Diwrdq_y.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-BocKz01i.js → sankeyDiagram-a04cb91d-DjxNZwMs.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-BW9zy30M.js → sequenceDiagram-c5b8d532-CWawhoyM.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-BjmUkr7N.js → stateDiagram-1ecb1508-Bow7IRrW.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-CWKpgiA4.js → stateDiagram-v2-c2b004d7-BJqu9_Fj.js} +1 -1
- package/dist/assets/{styles-b4e223ce-B5ZUhrVa.js → styles-b4e223ce-F2FDTYdm.js} +1 -1
- package/dist/assets/{styles-ca3715f6-Dg6_iMfO.js → styles-ca3715f6-DJITgKSs.js} +1 -1
- package/dist/assets/{styles-d45a18b0-BntmyMbR.js → styles-d45a18b0-DMSpafXP.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-CdnpTDnc.js → svgDrawCommon-b86b1483-3_yd3bB_.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-D3aQK7FD.js → timeline-definition-faaaa080-CV5umgp5.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-BkxgYbPP.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 +53 -3
- package/src/components/chat/sender/Sender.tsx +98 -18
- 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 +17 -1
- package/src/resources/locales/zh.json +17 -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-DpfFJ11i.js +0 -1
- package/dist/assets/clone-Dpf8N0T0.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-B3kWo3j-.js +0 -1
- package/dist/assets/index-BPyYnHE3.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': {
|
|
@@ -310,6 +310,14 @@
|
|
|
310
310
|
"connectionError": "WebSocket connection failed. Check the server and try again.",
|
|
311
311
|
"connectionClosed": "WebSocket connection closed. Try reconnecting.",
|
|
312
312
|
"retryConnection": "Retry",
|
|
313
|
+
"assetWarningsTitle": "Compatibility notes",
|
|
314
|
+
"assetWarningsCount": "{{count}} asset warnings",
|
|
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}}.",
|
|
313
321
|
"imageTooLarge": "Image must be smaller than 5MB",
|
|
314
322
|
"imageReadFailed": "Failed to read image",
|
|
315
323
|
"imageNotSupportedInInteraction": "Images are not supported for this interaction",
|
|
@@ -467,6 +475,7 @@
|
|
|
467
475
|
"addEnvVar": "Add Environment Variable",
|
|
468
476
|
"addHeader": "Add Header",
|
|
469
477
|
"addEntry": "Add Entry",
|
|
478
|
+
"newModelSelectorName": "New model selector",
|
|
470
479
|
"shortcutPlaceholder": "Press shortcut",
|
|
471
480
|
"clearShortcut": "Clear shortcut",
|
|
472
481
|
"newModelServiceName": "New model service name",
|
|
@@ -658,6 +667,12 @@
|
|
|
658
667
|
"desc": "Additional guidance for the assistant"
|
|
659
668
|
}
|
|
660
669
|
},
|
|
670
|
+
"models": {
|
|
671
|
+
"items": {
|
|
672
|
+
"label": "Model Selector Entries",
|
|
673
|
+
"desc": "Selector metadata keyed by `service` or `service,model`"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
661
676
|
"modelServices": {
|
|
662
677
|
"items": {
|
|
663
678
|
"label": "Service Entries",
|
|
@@ -705,7 +720,7 @@
|
|
|
705
720
|
"adapters": {
|
|
706
721
|
"items": {
|
|
707
722
|
"label": "Adapter Entries",
|
|
708
|
-
"desc": "Flattened configuration by adapter name"
|
|
723
|
+
"desc": "Flattened configuration by adapter name. Common fields include `defaultModel`, `includeModels`, and `excludeModels`."
|
|
709
724
|
}
|
|
710
725
|
},
|
|
711
726
|
"plugins": {
|
|
@@ -832,6 +847,7 @@
|
|
|
832
847
|
"sections": {
|
|
833
848
|
"general": "General",
|
|
834
849
|
"conversation": "Conversation",
|
|
850
|
+
"models": "Models",
|
|
835
851
|
"modelServices": "Model Services",
|
|
836
852
|
"channels": "Channels",
|
|
837
853
|
"adapters": "Adapters",
|
|
@@ -311,6 +311,14 @@
|
|
|
311
311
|
"connectionError": "WebSocket 连接失败,请检查服务状态后重试",
|
|
312
312
|
"connectionClosed": "WebSocket 连接已关闭,请重试",
|
|
313
313
|
"retryConnection": "重试连接",
|
|
314
|
+
"assetWarningsTitle": "兼容性提示",
|
|
315
|
+
"assetWarningsCount": "{{count}} 个资产告警",
|
|
316
|
+
"assetWarningsMore": "还有 {{count}} 条",
|
|
317
|
+
"selectionWarningsTitle": "模型路由提示",
|
|
318
|
+
"selectionWarningsCount": "{{count}} 个模型告警",
|
|
319
|
+
"selectionWarningReasonExcluded": "该模型被适配器规则排除了",
|
|
320
|
+
"selectionWarningReasonNotIncluded": "该模型不在适配器允许列表中",
|
|
321
|
+
"selectionWarningFallback": "适配器 {{adapter}} 已将模型从 {{requestedModel}} 切换到 {{resolvedModel}},原因:{{reason}}。",
|
|
314
322
|
"imageTooLarge": "图片大小不能超过 5MB",
|
|
315
323
|
"imageReadFailed": "图片读取失败",
|
|
316
324
|
"imageNotSupportedInInteraction": "当前交互不支持图片",
|
|
@@ -468,6 +476,7 @@
|
|
|
468
476
|
"addEnvVar": "添加环境变量",
|
|
469
477
|
"addHeader": "添加请求头",
|
|
470
478
|
"addEntry": "添加条目",
|
|
479
|
+
"newModelSelectorName": "新增模型选择器",
|
|
471
480
|
"shortcutPlaceholder": "按下快捷键",
|
|
472
481
|
"clearShortcut": "清除快捷键",
|
|
473
482
|
"newModelServiceName": "新增模型服务名称",
|
|
@@ -659,6 +668,12 @@
|
|
|
659
668
|
"desc": "为对话提供额外的提示与约束"
|
|
660
669
|
}
|
|
661
670
|
},
|
|
671
|
+
"models": {
|
|
672
|
+
"items": {
|
|
673
|
+
"label": "模型选择器明细",
|
|
674
|
+
"desc": "按 `service` 或 `service,model` 选择器配置元信息"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
662
677
|
"modelServices": {
|
|
663
678
|
"items": {
|
|
664
679
|
"label": "服务明细",
|
|
@@ -706,7 +721,7 @@
|
|
|
706
721
|
"adapters": {
|
|
707
722
|
"items": {
|
|
708
723
|
"label": "适配器明细",
|
|
709
|
-
"desc": "
|
|
724
|
+
"desc": "按适配器名称平铺配置,公共字段包括 `defaultModel`、`includeModels` 和 `excludeModels`"
|
|
710
725
|
}
|
|
711
726
|
},
|
|
712
727
|
"plugins": {
|
|
@@ -833,6 +848,7 @@
|
|
|
833
848
|
"sections": {
|
|
834
849
|
"general": "通用",
|
|
835
850
|
"conversation": "会话",
|
|
851
|
+
"models": "模型选择器",
|
|
836
852
|
"modelServices": "模型服务",
|
|
837
853
|
"channels": "频道",
|
|
838
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-Chovhfjq.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-BlL8UTXV.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-AXQhNDwJ.js";import{f as a,g as t}from"./styles-d45a18b0-BntmyMbR.js";import{ar as i}from"./mermaid.core-Chovhfjq.js";import"./graph-BlL8UTXV.js";import"./layout-DjdlpleO.js";import"./index-BPyYnHE3.js";import"./index-5325376f-D5mAuW3d.js";import"./clone-Dpf8N0T0.js";import"./edges-96097737-B2PDevbO.js";import"./createText-1719965b-DPPzBI6W.js";import"./line-DC6oQAQt.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-DpfFJ11i.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};
|