refactor: unify system tools as resources
This commit is contained in:
@@ -184,7 +184,6 @@ function blankPromptForm(name: string): AssistantForm {
|
||||
actions: [],
|
||||
openingMessage: null,
|
||||
},
|
||||
systemTools: [],
|
||||
visionEnabled: false,
|
||||
visionModelResourceId: "",
|
||||
toolIds: [],
|
||||
@@ -480,7 +479,6 @@ export function AssistantPage(props: AssistantPageProps) {
|
||||
actions: a.startup?.actions ?? [],
|
||||
openingMessage: a.startup?.openingMessage ?? null,
|
||||
},
|
||||
systemTools: a.systemTools ?? [],
|
||||
visionEnabled: a.visionEnabled,
|
||||
visionModelResourceId: a.visionModelResourceId ?? "",
|
||||
toolIds: a.toolIds ?? [],
|
||||
@@ -557,7 +555,6 @@ export function AssistantPage(props: AssistantPageProps) {
|
||||
actions: [],
|
||||
openingMessage: null,
|
||||
},
|
||||
systemTools: [],
|
||||
visionEnabled: false,
|
||||
visionModelResourceId: null,
|
||||
modelResourceIds: {},
|
||||
@@ -617,7 +614,6 @@ export function AssistantPage(props: AssistantPageProps) {
|
||||
enableInterrupt: form.enableInterrupt,
|
||||
turnConfig: form.turnConfig,
|
||||
startup: form.startup,
|
||||
systemTools: form.runtimeMode === "pipeline" ? form.systemTools : [],
|
||||
visionEnabled: form.visionEnabled,
|
||||
visionModelResourceId: form.visionModelResourceId || null,
|
||||
modelResourceIds: {
|
||||
@@ -1304,10 +1300,16 @@ export function AssistantPage(props: AssistantPageProps) {
|
||||
vision: visionModelOptionsFor(""),
|
||||
}}
|
||||
toolOptions={tools
|
||||
.filter(
|
||||
(tool) => tool.status === "active" && tool.type !== "system",
|
||||
)
|
||||
.map((tool) => ({ value: tool.id, label: tool.name }))}
|
||||
.filter((tool) => tool.status === "active")
|
||||
.map((tool) => ({
|
||||
value: tool.id,
|
||||
label: tool.name,
|
||||
toolType: tool.type,
|
||||
systemKind:
|
||||
tool.definition.type === "system"
|
||||
? tool.definition.config.kind
|
||||
: undefined,
|
||||
}))}
|
||||
knowledgeOptions={kbOptions}
|
||||
onBack={() => router.push("/assistants")}
|
||||
onSave={() => void handleSaveWorkflow()}
|
||||
|
||||
Reference in New Issue
Block a user