vue-agent-start 0.1.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/package.json +30 -0
- package/pnpm-workspace.yaml +3 -0
- package/src/agent-flow/adapter/backend.ts +99 -0
- package/src/agent-flow/components/ChatIframePanel.vue +773 -0
- package/src/agent-flow/components/DatasetItemCard.vue +313 -0
- package/src/agent-flow/components/MemoryWindow.vue +104 -0
- package/src/agent-flow/components/PromptEditor.vue +804 -0
- package/src/agent-flow/components/PromptEditorTagPanel.vue +460 -0
- package/src/agent-flow/components/SvgIcon.vue +32 -0
- package/src/agent-flow/components/ToolItemCard.vue +169 -0
- package/src/agent-flow/components/VariableCard.vue +161 -0
- package/src/agent-flow/components/VariableSelector.vue +162 -0
- package/src/agent-flow/components/chat-iframe-types.ts +35 -0
- package/src/agent-flow/components/stubs/DatasetChooser.vue +70 -0
- package/src/agent-flow/components/stubs/Embedding.vue +22 -0
- package/src/agent-flow/components/stubs/ModelSelect.vue +24 -0
- package/src/agent-flow/components/stubs/RestfulSelectCard.vue +24 -0
- package/src/agent-flow/components/stubs/ToolChooser.vue +96 -0
- package/src/agent-flow/components/stubs/TriggersItemCard.vue +126 -0
- package/src/agent-flow/components/stubs/VariableModal.vue +115 -0
- package/src/agent-flow/index.ts +73 -0
- package/src/agent-flow/stores/workflow.ts +72 -0
- package/src/agent-flow/utils/langUtils.ts +173 -0
- package/src/agent-flow/workflow/Ability.vue +65 -0
- package/src/agent-flow/workflow/AuthorizationItem.vue +101 -0
- package/src/agent-flow/workflow/ConversationVar.vue +42 -0
- package/src/agent-flow/workflow/CustomEdge.vue +94 -0
- package/src/agent-flow/workflow/EnvironmentVar.vue +40 -0
- package/src/agent-flow/workflow/FlowDesigner.vue +2802 -0
- package/src/agent-flow/workflow/Icon.vue +179 -0
- package/src/agent-flow/workflow/NodeConfig.vue +509 -0
- package/src/agent-flow/workflow/NodeConfigCard.vue +460 -0
- package/src/agent-flow/workflow/NodeHandle.vue +147 -0
- package/src/agent-flow/workflow/NodeHeaderToolbar.vue +77 -0
- package/src/agent-flow/workflow/NodeHoverToolbar.vue +176 -0
- package/src/agent-flow/workflow/OutputItemCard.vue +668 -0
- package/src/agent-flow/workflow/ParamTableItem.vue +200 -0
- package/src/agent-flow/workflow/StructTable.vue +202 -0
- package/src/agent-flow/workflow/VarInsertField.vue +517 -0
- package/src/agent-flow/workflow/VarSelectField.vue +223 -0
- package/src/agent-flow/workflow/VariableSelectorItem.vue +48 -0
- package/src/agent-flow/workflow/WfField.vue +206 -0
- package/src/agent-flow/workflow/_config-base.css +470 -0
- package/src/agent-flow/workflow/composables/useNode.js +55 -0
- package/src/agent-flow/workflow/index.vue +53 -0
- package/src/agent-flow/workflow/nodeCard/AgentNodeCard.vue +180 -0
- package/src/agent-flow/workflow/nodeCard/AnswerNodeCard.vue +65 -0
- package/src/agent-flow/workflow/nodeCard/ClassifierCard.vue +152 -0
- package/src/agent-flow/workflow/nodeCard/CodeNodeCard.vue +139 -0
- package/src/agent-flow/workflow/nodeCard/ConditionNodeCard.vue +323 -0
- package/src/agent-flow/workflow/nodeCard/DocumentExtractorCard.vue +83 -0
- package/src/agent-flow/workflow/nodeCard/EndNodeCard.vue +123 -0
- package/src/agent-flow/workflow/nodeCard/HttpNodeCard.vue +451 -0
- package/src/agent-flow/workflow/nodeCard/HumanInputCard.vue +152 -0
- package/src/agent-flow/workflow/nodeCard/IterationCard.vue +66 -0
- package/src/agent-flow/workflow/nodeCard/KnowledgeRetrievalCard.vue +48 -0
- package/src/agent-flow/workflow/nodeCard/LLMNodeCard.vue +206 -0
- package/src/agent-flow/workflow/nodeCard/ListOperatorCard.vue +188 -0
- package/src/agent-flow/workflow/nodeCard/ParameterExtractorCard.vue +352 -0
- package/src/agent-flow/workflow/nodeCard/ServiceApiNodeCard.vue +188 -0
- package/src/agent-flow/workflow/nodeCard/StartNodeCard.vue +216 -0
- package/src/agent-flow/workflow/nodeCard/VariableAssignerCard.vue +125 -0
- package/src/agent-flow/workflow/nodeCard/VariableNodeCard.vue +121 -0
- package/src/agent-flow/workflow/nodes/AgentNode.vue +122 -0
- package/src/agent-flow/workflow/nodes/AnswerNode.vue +99 -0
- package/src/agent-flow/workflow/nodes/ClassifierNode.vue +199 -0
- package/src/agent-flow/workflow/nodes/CodeNode.vue +152 -0
- package/src/agent-flow/workflow/nodes/ConditionNode.vue +232 -0
- package/src/agent-flow/workflow/nodes/DocumentExtractorNode.vue +96 -0
- package/src/agent-flow/workflow/nodes/EndNode.vue +119 -0
- package/src/agent-flow/workflow/nodes/FileUploadNode.vue +97 -0
- package/src/agent-flow/workflow/nodes/HttpNode.vue +204 -0
- package/src/agent-flow/workflow/nodes/HumanInputNode.vue +110 -0
- package/src/agent-flow/workflow/nodes/IterationNode.vue +98 -0
- package/src/agent-flow/workflow/nodes/KnowledgeRetrievalNode.vue +253 -0
- package/src/agent-flow/workflow/nodes/LLMNode.vue +134 -0
- package/src/agent-flow/workflow/nodes/ListOperatorNode.vue +111 -0
- package/src/agent-flow/workflow/nodes/LoopNode.vue +94 -0
- package/src/agent-flow/workflow/nodes/ParameterExtractorNode.vue +147 -0
- package/src/agent-flow/workflow/nodes/ServiceApiNode.vue +161 -0
- package/src/agent-flow/workflow/nodes/StartNode.vue +199 -0
- package/src/agent-flow/workflow/nodes/TemplateNode.vue +103 -0
- package/src/agent-flow/workflow/nodes/UserInputNode.vue +92 -0
- package/src/agent-flow/workflow/nodes/VariableAssignerNode.vue +145 -0
- package/src/agent-flow/workflow/nodes/VariableNode.vue +130 -0
- package/src/agent-flow/workflow/nodes/_node-base.css +338 -0
- package/src/agent-flow/workflow/utils/node_card_form.ts +335 -0
- package/src/agent-flow/workflow/utils/node_config.ts +63 -0
- package/src/agent-flow/workflow/utils/workflow_utils.ts +151 -0
- package/src/agent-studio/adapters/springAgentStart.ts +390 -0
- package/src/agent-studio/api/index.ts +1 -0
- package/src/agent-studio/api/types.ts +173 -0
- package/src/agent-studio/components/AgentApiDocs.vue +500 -0
- package/src/agent-studio/components/AgentAppsPage.vue +1601 -0
- package/src/agent-studio/components/AgentCardGrid.vue +259 -0
- package/src/agent-studio/components/AgentChatPage.vue +553 -0
- package/src/agent-studio/components/AgentDebugPanel.vue +350 -0
- package/src/agent-studio/components/AgentLogsPanel.vue +391 -0
- package/src/agent-studio/components/AgentMonitorPanel.vue +204 -0
- package/src/agent-studio/components/AgentOrchestrate.vue +505 -0
- package/src/agent-studio/components/AgentPromptEditor.vue +237 -0
- package/src/agent-studio/components/AgentStudioShell.vue +227 -0
- package/src/agent-studio/components/AgentToolsPanel.vue +394 -0
- package/src/agent-studio/components/AgentVariablesPanel.vue +205 -0
- package/src/agent-studio/components/ApiKeyManager.vue +251 -0
- package/src/agent-studio/components/AppDesignDrawer.vue +3391 -0
- package/src/agent-studio/components/CreateAppModal.vue +737 -0
- package/src/agent-studio/components/SparkChart.vue +200 -0
- package/src/agent-studio/components/VariableEditorModal.vue +499 -0
- package/src/agent-studio/composables/useAgentStudio.ts +347 -0
- package/src/agent-studio/index.ts +60 -0
- package/src/agent-studio/panels/DrawerFlowDesigner.vue +203 -0
- package/src/agent-studio/panels/LogAnnotationPanel.vue +490 -0
- package/src/agent-studio/panels/MonitorPanel.vue +535 -0
- package/src/agent-studio/types.ts +242 -0
- package/src/index.ts +155 -0
- package/src/knowledge-hub/adapters/springAgentStart.ts +472 -0
- package/src/knowledge-hub/components/AddDocumentsWizard.vue +1452 -0
- package/src/knowledge-hub/components/CreateDatasetWizard.vue +1723 -0
- package/src/knowledge-hub/components/DatasetCardGrid.vue +467 -0
- package/src/knowledge-hub/components/DatasetDetailDrawer.vue +888 -0
- package/src/knowledge-hub/components/DatasetPicker.vue +65 -0
- package/src/knowledge-hub/components/DatasetPickerModal.vue +526 -0
- package/src/knowledge-hub/components/DatasetSettingsPanel.vue +908 -0
- package/src/knowledge-hub/components/DatasetSidebar.vue +781 -0
- package/src/knowledge-hub/components/DocumentChunksView.vue +802 -0
- package/src/knowledge-hub/components/DocumentTable.vue +552 -0
- package/src/knowledge-hub/components/HitTestingPanel.vue +74 -0
- package/src/knowledge-hub/components/KnowledgeApp.vue +66 -0
- package/src/knowledge-hub/components/KnowledgeHubApp.vue +504 -0
- package/src/knowledge-hub/components/RecallTestingPanelV2.vue +515 -0
- package/src/knowledge-hub/components/RetrievalConfigPopover.vue +270 -0
- package/src/knowledge-hub/components/RetrievalMethodPicker.vue +547 -0
- package/src/knowledge-hub/components/RetrievedList.vue +24 -0
- package/src/knowledge-hub/components/internal/KhDialog.vue +195 -0
- package/src/knowledge-hub/composables/useKnowledge.ts +89 -0
- package/src/knowledge-hub/i18n/index.ts +2 -0
- package/src/knowledge-hub/i18n/messages.ts +422 -0
- package/src/knowledge-hub/i18n/useKhI18n.ts +107 -0
- package/src/knowledge-hub/index.ts +46 -0
- package/src/knowledge-hub/styles/index.css +4 -0
- package/src/knowledge-hub/styles/tokens.css +138 -0
- package/src/knowledge-hub/types/api.ts +213 -0
- package/src/knowledge-hub/types/dataset.ts +88 -0
- package/src/knowledge-hub/types/document.ts +45 -0
- package/src/knowledge-hub/types/index.ts +9 -0
- package/src/knowledge-hub/types/retrieval.ts +46 -0
- package/src/provider-hub/components/CredentialForm.vue +103 -0
- package/src/provider-hub/components/DefaultModelsPanel.vue +270 -0
- package/src/provider-hub/components/GroupedModelSelect.vue +445 -0
- package/src/provider-hub/components/ModelCardGrid.vue +332 -0
- package/src/provider-hub/components/ModelParameterDrawer.vue +739 -0
- package/src/provider-hub/components/ModelPickerPopover.vue +1282 -0
- package/src/provider-hub/components/ProviderApp.vue +159 -0
- package/src/provider-hub/components/ProviderCredentialModal.vue +321 -0
- package/src/provider-hub/components/ProviderGallery.vue +131 -0
- package/src/provider-hub/components/ProviderHubShell.vue +1992 -0
- package/src/provider-hub/components/ProviderIcon.vue +130 -0
- package/src/provider-hub/composables/useProviderHub.ts +358 -0
- package/src/provider-hub/index.ts +43 -0
- package/src/provider-hub/svg/MiniMax.svg +1 -0
- package/src/provider-hub/svg/Volcengine.svg +1 -0
- package/src/provider-hub/svg/Zhipu.svg +1 -0
- package/src/provider-hub/svg/deepseek.svg +1 -0
- package/src/provider-hub/svg/moonshot.svg +1 -0
- package/src/provider-hub/svg/openai.svg +1 -0
- package/src/provider-hub/svg/qwen.svg +1 -0
- package/src/provider-hub/svg/siliconflow.svg +1 -0
- package/src/provider-hub/types.ts +256 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* 编排 tab body. Two-column: left = editor sections stack, right = debug slot.
|
|
4
|
+
* Above both, a toolbar with:
|
|
5
|
+
* - "编排" heading (implicit — nav shows it)
|
|
6
|
+
* - right cluster: [Agent 设置] [模型选择] [发布]
|
|
7
|
+
*
|
|
8
|
+
* The individual sections (提示词, 变量, 知识库, 元数据过滤, 工具, 视觉) can be
|
|
9
|
+
* driven via props, or the host can drop its own via the default slot to fully
|
|
10
|
+
* customize. Both flows are supported so old callers can stay declarative.
|
|
11
|
+
*/
|
|
12
|
+
import ModelPickerPopover from '../../provider-hub/components/ModelPickerPopover.vue';
|
|
13
|
+
import type { SelectedModel } from '../../provider-hub/types';
|
|
14
|
+
|
|
15
|
+
import type {
|
|
16
|
+
PromptVariable,
|
|
17
|
+
StudioKnowledge,
|
|
18
|
+
StudioModelOption,
|
|
19
|
+
StudioTool,
|
|
20
|
+
} from '../types';
|
|
21
|
+
import AgentPromptEditor from './AgentPromptEditor.vue';
|
|
22
|
+
import AgentToolsPanel from './AgentToolsPanel.vue';
|
|
23
|
+
import AgentVariablesPanel from './AgentVariablesPanel.vue';
|
|
24
|
+
|
|
25
|
+
interface Props {
|
|
26
|
+
prompt: string;
|
|
27
|
+
variables: PromptVariable[];
|
|
28
|
+
attachedTools: string[];
|
|
29
|
+
availableTools?: StudioTool[];
|
|
30
|
+
knowledge?: StudioKnowledge[];
|
|
31
|
+
visionEnabled?: boolean;
|
|
32
|
+
metadataFilter?: string;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Legacy dropdown data — the top-right picker now uses
|
|
35
|
+
* {@link ModelPickerPopover} which pulls the catalog itself. Kept only so
|
|
36
|
+
* existing declarative callers still compile.
|
|
37
|
+
*/
|
|
38
|
+
models?: StudioModelOption[];
|
|
39
|
+
/** Current selection surfaced by the popover picker. */
|
|
40
|
+
modelSelection?: SelectedModel;
|
|
41
|
+
/** Multi-tenant deployments pass this through to the picker's data fetch. */
|
|
42
|
+
tenantId?: string;
|
|
43
|
+
/** Toggle the "发布" button loading state. */
|
|
44
|
+
publishing?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
48
|
+
availableTools: () => [],
|
|
49
|
+
knowledge: () => [],
|
|
50
|
+
visionEnabled: false,
|
|
51
|
+
metadataFilter: '禁用',
|
|
52
|
+
models: () => [],
|
|
53
|
+
modelSelection: () => ({}),
|
|
54
|
+
publishing: false,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const emit = defineEmits<{
|
|
58
|
+
(e: 'update:prompt', v: string): void;
|
|
59
|
+
(e: 'update:variables', v: PromptVariable[]): void;
|
|
60
|
+
(e: 'update:attachedTools', v: string[]): void;
|
|
61
|
+
(e: 'update:knowledge', v: StudioKnowledge[]): void;
|
|
62
|
+
(e: 'update:visionEnabled', v: boolean): void;
|
|
63
|
+
(e: 'update:metadataFilter', v: string): void;
|
|
64
|
+
(e: 'update:modelSelection', v: SelectedModel): void;
|
|
65
|
+
(e: 'publish'): void;
|
|
66
|
+
(e: 'openSettings'): void;
|
|
67
|
+
(e: 'addKnowledge'): void;
|
|
68
|
+
(e: 'generatePrompt'): void;
|
|
69
|
+
}>();
|
|
70
|
+
|
|
71
|
+
function onPickModel(sel: SelectedModel) {
|
|
72
|
+
emit('update:modelSelection', sel);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function removeKnowledge(id: string) {
|
|
76
|
+
emit(
|
|
77
|
+
'update:knowledge',
|
|
78
|
+
props.knowledge.filter((k) => k.id !== id),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<div class="orch">
|
|
85
|
+
<!-- Toolbar -->
|
|
86
|
+
<header class="orch-top">
|
|
87
|
+
<h2 class="orch-top-title">编排</h2>
|
|
88
|
+
<div class="orch-top-actions">
|
|
89
|
+
<button
|
|
90
|
+
type="button"
|
|
91
|
+
class="orch-btn orch-btn-ghost"
|
|
92
|
+
@click="emit('openSettings')"
|
|
93
|
+
>
|
|
94
|
+
⚙ Agent 设置
|
|
95
|
+
</button>
|
|
96
|
+
<div class="orch-model">
|
|
97
|
+
<ModelPickerPopover
|
|
98
|
+
:model-value="modelSelection"
|
|
99
|
+
model-type="LLM"
|
|
100
|
+
:tenant-id="tenantId"
|
|
101
|
+
placement="bottomRight"
|
|
102
|
+
:width="380"
|
|
103
|
+
placeholder="选择模型"
|
|
104
|
+
@update:model-value="onPickModel"
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
<button
|
|
108
|
+
type="button"
|
|
109
|
+
class="orch-btn orch-btn-primary"
|
|
110
|
+
:disabled="publishing"
|
|
111
|
+
@click="emit('publish')"
|
|
112
|
+
>
|
|
113
|
+
{{ publishing ? '发布中...' : '发布' }}
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
</header>
|
|
117
|
+
|
|
118
|
+
<!-- Two-column body -->
|
|
119
|
+
<div class="orch-body">
|
|
120
|
+
<!-- LEFT: editor sections -->
|
|
121
|
+
<section class="orch-left">
|
|
122
|
+
<slot name="prompt">
|
|
123
|
+
<AgentPromptEditor
|
|
124
|
+
:model-value="prompt"
|
|
125
|
+
:variables="variables"
|
|
126
|
+
@update:model-value="emit('update:prompt', $event)"
|
|
127
|
+
@generate="emit('generatePrompt')"
|
|
128
|
+
/>
|
|
129
|
+
</slot>
|
|
130
|
+
|
|
131
|
+
<slot name="variables">
|
|
132
|
+
<AgentVariablesPanel
|
|
133
|
+
:list="variables"
|
|
134
|
+
@update:list="emit('update:variables', $event)"
|
|
135
|
+
/>
|
|
136
|
+
</slot>
|
|
137
|
+
|
|
138
|
+
<!-- 知识库 -->
|
|
139
|
+
<slot name="knowledge">
|
|
140
|
+
<div class="orch-card">
|
|
141
|
+
<div class="orch-card-head">
|
|
142
|
+
<div class="orch-card-title">
|
|
143
|
+
知识库
|
|
144
|
+
<span class="orch-help" title="给模型接入知识库作为上下文">
|
|
145
|
+
ⓘ
|
|
146
|
+
</span>
|
|
147
|
+
</div>
|
|
148
|
+
<button
|
|
149
|
+
type="button"
|
|
150
|
+
class="orch-card-btn"
|
|
151
|
+
@click="emit('addKnowledge')"
|
|
152
|
+
>
|
|
153
|
+
+ 添加
|
|
154
|
+
</button>
|
|
155
|
+
</div>
|
|
156
|
+
<div v-if="knowledge.length === 0" class="orch-hint">
|
|
157
|
+
你可以让模型引用知识库作为上下文。
|
|
158
|
+
</div>
|
|
159
|
+
<div v-else class="orch-know-list">
|
|
160
|
+
<div
|
|
161
|
+
v-for="k in knowledge"
|
|
162
|
+
:key="k.id"
|
|
163
|
+
class="orch-know-row"
|
|
164
|
+
>
|
|
165
|
+
<span class="orch-know-icon">📚</span>
|
|
166
|
+
<span class="orch-know-name">{{ k.name }}</span>
|
|
167
|
+
<span v-if="k.documentCount != null" class="orch-know-count">
|
|
168
|
+
{{ k.documentCount }} 文档
|
|
169
|
+
</span>
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
class="orch-know-x"
|
|
173
|
+
@click="removeKnowledge(k.id)"
|
|
174
|
+
>
|
|
175
|
+
×
|
|
176
|
+
</button>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
</slot>
|
|
181
|
+
|
|
182
|
+
<!-- 元数据过滤 (inline row, matches Dify) -->
|
|
183
|
+
<div class="orch-inline-card">
|
|
184
|
+
<div class="orch-inline-label">
|
|
185
|
+
元数据过滤
|
|
186
|
+
<span class="orch-help" title="限制检索到的文档必须匹配指定元数据">
|
|
187
|
+
ⓘ
|
|
188
|
+
</span>
|
|
189
|
+
</div>
|
|
190
|
+
<select
|
|
191
|
+
class="orch-inline-select"
|
|
192
|
+
:value="metadataFilter"
|
|
193
|
+
@change="emit('update:metadataFilter', ($event.target as HTMLSelectElement).value)"
|
|
194
|
+
>
|
|
195
|
+
<option value="禁用">禁用</option>
|
|
196
|
+
<option value="自动">自动</option>
|
|
197
|
+
<option value="手动">手动</option>
|
|
198
|
+
</select>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<!-- 工具 -->
|
|
202
|
+
<slot name="tools">
|
|
203
|
+
<AgentToolsPanel
|
|
204
|
+
:attached="attachedTools"
|
|
205
|
+
:available="availableTools"
|
|
206
|
+
@update:attached="emit('update:attachedTools', $event)"
|
|
207
|
+
/>
|
|
208
|
+
</slot>
|
|
209
|
+
|
|
210
|
+
<!-- 视觉 -->
|
|
211
|
+
<div class="orch-inline-card">
|
|
212
|
+
<div class="orch-inline-label">
|
|
213
|
+
<span class="orch-vision-icon">👁</span>
|
|
214
|
+
视觉
|
|
215
|
+
<span class="orch-help" title="允许模型识别用户上传的图片">
|
|
216
|
+
ⓘ
|
|
217
|
+
</span>
|
|
218
|
+
</div>
|
|
219
|
+
<div class="orch-inline-right">
|
|
220
|
+
<button type="button" class="orch-inline-ghost">⚙ 设置</button>
|
|
221
|
+
<label class="orch-switch">
|
|
222
|
+
<input
|
|
223
|
+
type="checkbox"
|
|
224
|
+
:checked="visionEnabled"
|
|
225
|
+
@change="emit('update:visionEnabled', ($event.target as HTMLInputElement).checked)"
|
|
226
|
+
/>
|
|
227
|
+
<span class="orch-switch-slider" />
|
|
228
|
+
</label>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</section>
|
|
232
|
+
|
|
233
|
+
<!-- RIGHT: debug slot -->
|
|
234
|
+
<aside class="orch-right">
|
|
235
|
+
<slot name="debug" />
|
|
236
|
+
</aside>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</template>
|
|
240
|
+
|
|
241
|
+
<style scoped>
|
|
242
|
+
.orch {
|
|
243
|
+
display: flex;
|
|
244
|
+
flex-direction: column;
|
|
245
|
+
height: 100%;
|
|
246
|
+
min-height: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Toolbar */
|
|
250
|
+
.orch-top {
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
justify-content: space-between;
|
|
254
|
+
padding: 12px 20px;
|
|
255
|
+
border-bottom: 1px solid #e5e7eb;
|
|
256
|
+
background: #fff;
|
|
257
|
+
}
|
|
258
|
+
.orch-top-title {
|
|
259
|
+
margin: 0;
|
|
260
|
+
font-size: 15px;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
color: #0f172a;
|
|
263
|
+
}
|
|
264
|
+
.orch-top-actions {
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
gap: 8px;
|
|
268
|
+
}
|
|
269
|
+
.orch-btn {
|
|
270
|
+
display: inline-flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
gap: 4px;
|
|
273
|
+
padding: 6px 12px;
|
|
274
|
+
border: 1px solid #e2e8f0;
|
|
275
|
+
border-radius: 8px;
|
|
276
|
+
background: #fff;
|
|
277
|
+
font-size: 12px;
|
|
278
|
+
color: #475569;
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
transition: background 0.15s;
|
|
281
|
+
}
|
|
282
|
+
.orch-btn:hover:not(:disabled) {
|
|
283
|
+
background: #f1f5f9;
|
|
284
|
+
}
|
|
285
|
+
.orch-btn-primary {
|
|
286
|
+
background: linear-gradient(135deg, #6366f1, #4f46e5);
|
|
287
|
+
border-color: transparent;
|
|
288
|
+
color: #fff;
|
|
289
|
+
font-weight: 500;
|
|
290
|
+
}
|
|
291
|
+
.orch-btn-primary:hover:not(:disabled) {
|
|
292
|
+
background: linear-gradient(135deg, #4f46e5, #4338ca);
|
|
293
|
+
}
|
|
294
|
+
.orch-btn-primary:disabled {
|
|
295
|
+
background: #cbd5e1;
|
|
296
|
+
cursor: not-allowed;
|
|
297
|
+
}
|
|
298
|
+
.orch-btn-ghost {
|
|
299
|
+
background: transparent;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Model picker — 复用 provider-hub 的 ModelPickerPopover,触发块尺寸对齐 toolbar */
|
|
303
|
+
.orch-model {
|
|
304
|
+
min-width: 240px;
|
|
305
|
+
max-width: 320px;
|
|
306
|
+
}
|
|
307
|
+
.orch-model :deep(.ph-mp-trigger) {
|
|
308
|
+
width: 100%;
|
|
309
|
+
min-height: 34px;
|
|
310
|
+
padding: 4px 10px;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* Body columns */
|
|
314
|
+
.orch-body {
|
|
315
|
+
flex: 1;
|
|
316
|
+
min-height: 0;
|
|
317
|
+
display: grid;
|
|
318
|
+
grid-template-columns: 1fr 380px;
|
|
319
|
+
gap: 0;
|
|
320
|
+
}
|
|
321
|
+
.orch-left {
|
|
322
|
+
padding: 16px 20px;
|
|
323
|
+
overflow-y: auto;
|
|
324
|
+
display: flex;
|
|
325
|
+
flex-direction: column;
|
|
326
|
+
gap: 12px;
|
|
327
|
+
}
|
|
328
|
+
.orch-right {
|
|
329
|
+
padding: 16px 16px 16px 4px;
|
|
330
|
+
overflow: hidden;
|
|
331
|
+
min-height: 0;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* Generic card */
|
|
335
|
+
.orch-card {
|
|
336
|
+
padding: 12px 14px;
|
|
337
|
+
background: #fff;
|
|
338
|
+
border: 1px solid #e5e7eb;
|
|
339
|
+
border-radius: 12px;
|
|
340
|
+
}
|
|
341
|
+
.orch-card-head {
|
|
342
|
+
display: flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
justify-content: space-between;
|
|
345
|
+
margin-bottom: 6px;
|
|
346
|
+
}
|
|
347
|
+
.orch-card-title {
|
|
348
|
+
font-size: 13px;
|
|
349
|
+
font-weight: 600;
|
|
350
|
+
color: #334155;
|
|
351
|
+
}
|
|
352
|
+
.orch-card-btn {
|
|
353
|
+
padding: 2px 8px;
|
|
354
|
+
border: none;
|
|
355
|
+
border-radius: 6px;
|
|
356
|
+
background: transparent;
|
|
357
|
+
font-size: 12px;
|
|
358
|
+
color: #4338ca;
|
|
359
|
+
cursor: pointer;
|
|
360
|
+
}
|
|
361
|
+
.orch-card-btn:hover {
|
|
362
|
+
background: #eef2ff;
|
|
363
|
+
}
|
|
364
|
+
.orch-help {
|
|
365
|
+
margin-left: 4px;
|
|
366
|
+
color: #94a3b8;
|
|
367
|
+
font-size: 11px;
|
|
368
|
+
cursor: help;
|
|
369
|
+
}
|
|
370
|
+
.orch-hint {
|
|
371
|
+
font-size: 12px;
|
|
372
|
+
color: #94a3b8;
|
|
373
|
+
}
|
|
374
|
+
.orch-know-list {
|
|
375
|
+
display: flex;
|
|
376
|
+
flex-direction: column;
|
|
377
|
+
gap: 6px;
|
|
378
|
+
}
|
|
379
|
+
.orch-know-row {
|
|
380
|
+
display: flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
gap: 8px;
|
|
383
|
+
padding: 6px 10px;
|
|
384
|
+
background: #f8fafc;
|
|
385
|
+
border-radius: 8px;
|
|
386
|
+
font-size: 12px;
|
|
387
|
+
}
|
|
388
|
+
.orch-know-icon {
|
|
389
|
+
font-size: 14px;
|
|
390
|
+
}
|
|
391
|
+
.orch-know-name {
|
|
392
|
+
color: #0f172a;
|
|
393
|
+
font-weight: 500;
|
|
394
|
+
}
|
|
395
|
+
.orch-know-count {
|
|
396
|
+
margin-left: 4px;
|
|
397
|
+
color: #94a3b8;
|
|
398
|
+
font-size: 11px;
|
|
399
|
+
}
|
|
400
|
+
.orch-know-x {
|
|
401
|
+
margin-left: auto;
|
|
402
|
+
padding: 0 6px;
|
|
403
|
+
border: none;
|
|
404
|
+
background: transparent;
|
|
405
|
+
color: #94a3b8;
|
|
406
|
+
font-size: 14px;
|
|
407
|
+
cursor: pointer;
|
|
408
|
+
}
|
|
409
|
+
.orch-know-x:hover {
|
|
410
|
+
color: #dc2626;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/* Inline single-row card */
|
|
414
|
+
.orch-inline-card {
|
|
415
|
+
display: flex;
|
|
416
|
+
align-items: center;
|
|
417
|
+
justify-content: space-between;
|
|
418
|
+
padding: 10px 14px;
|
|
419
|
+
background: #fff;
|
|
420
|
+
border: 1px solid #e5e7eb;
|
|
421
|
+
border-radius: 12px;
|
|
422
|
+
}
|
|
423
|
+
.orch-inline-label {
|
|
424
|
+
display: inline-flex;
|
|
425
|
+
align-items: center;
|
|
426
|
+
gap: 6px;
|
|
427
|
+
font-size: 13px;
|
|
428
|
+
font-weight: 600;
|
|
429
|
+
color: #334155;
|
|
430
|
+
}
|
|
431
|
+
.orch-inline-select {
|
|
432
|
+
padding: 3px 8px;
|
|
433
|
+
border: 1px solid #e2e8f0;
|
|
434
|
+
border-radius: 6px;
|
|
435
|
+
background: #fff;
|
|
436
|
+
font-size: 12px;
|
|
437
|
+
color: #0f172a;
|
|
438
|
+
}
|
|
439
|
+
.orch-inline-right {
|
|
440
|
+
display: flex;
|
|
441
|
+
align-items: center;
|
|
442
|
+
gap: 6px;
|
|
443
|
+
}
|
|
444
|
+
.orch-inline-ghost {
|
|
445
|
+
padding: 3px 8px;
|
|
446
|
+
border: none;
|
|
447
|
+
border-radius: 6px;
|
|
448
|
+
background: transparent;
|
|
449
|
+
font-size: 12px;
|
|
450
|
+
color: #64748b;
|
|
451
|
+
cursor: pointer;
|
|
452
|
+
}
|
|
453
|
+
.orch-inline-ghost:hover {
|
|
454
|
+
background: #f1f5f9;
|
|
455
|
+
}
|
|
456
|
+
.orch-vision-icon {
|
|
457
|
+
display: inline-flex;
|
|
458
|
+
align-items: center;
|
|
459
|
+
justify-content: center;
|
|
460
|
+
width: 20px;
|
|
461
|
+
height: 20px;
|
|
462
|
+
background: #4f46e5;
|
|
463
|
+
border-radius: 4px;
|
|
464
|
+
color: #fff;
|
|
465
|
+
font-size: 10px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* Switch */
|
|
469
|
+
.orch-switch {
|
|
470
|
+
position: relative;
|
|
471
|
+
width: 32px;
|
|
472
|
+
height: 18px;
|
|
473
|
+
display: inline-block;
|
|
474
|
+
}
|
|
475
|
+
.orch-switch input {
|
|
476
|
+
opacity: 0;
|
|
477
|
+
width: 0;
|
|
478
|
+
height: 0;
|
|
479
|
+
}
|
|
480
|
+
.orch-switch-slider {
|
|
481
|
+
position: absolute;
|
|
482
|
+
inset: 0;
|
|
483
|
+
background: #cbd5e1;
|
|
484
|
+
border-radius: 999px;
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
transition: background 0.15s;
|
|
487
|
+
}
|
|
488
|
+
.orch-switch-slider::before {
|
|
489
|
+
content: '';
|
|
490
|
+
position: absolute;
|
|
491
|
+
width: 14px;
|
|
492
|
+
height: 14px;
|
|
493
|
+
top: 2px;
|
|
494
|
+
left: 2px;
|
|
495
|
+
background: #fff;
|
|
496
|
+
border-radius: 50%;
|
|
497
|
+
transition: transform 0.15s;
|
|
498
|
+
}
|
|
499
|
+
.orch-switch input:checked + .orch-switch-slider {
|
|
500
|
+
background: #4f46e5;
|
|
501
|
+
}
|
|
502
|
+
.orch-switch input:checked + .orch-switch-slider::before {
|
|
503
|
+
transform: translateX(14px);
|
|
504
|
+
}
|
|
505
|
+
</style>
|