F3: connect Prompt tools and web task controls to native Jobs
This commit is contained in:
@@ -90,6 +90,7 @@ const EXTERNAL_TOOL_TYPE_LABELS: Record<Tool["type"], string> = {
|
||||
http: "HTTP",
|
||||
mcp: "MCP",
|
||||
client: "Client",
|
||||
task: "后台任务",
|
||||
};
|
||||
|
||||
const OPENING_MODE_OPTIONS: Array<{
|
||||
@@ -220,7 +221,7 @@ export function PromptEditor({
|
||||
(key) =>
|
||||
Boolean(form.builtInTools[key]) && !allowedRealtimeBuiltIns.has(key),
|
||||
);
|
||||
const allowedRealtimeExternalTypes = new Set(
|
||||
const allowedRealtimeExternalTypes = new Set<string>(
|
||||
realtimeToolFeatures?.externalTypes ?? [],
|
||||
);
|
||||
const unsupportedToolBindings = form.toolBindings.filter((binding) => {
|
||||
@@ -881,11 +882,12 @@ export function PromptEditor({
|
||||
description="从资源库添加工具,并配置当前助手的参数来源与结果写入"
|
||||
>
|
||||
<ToolBindingEditor
|
||||
allowTask={form.runtimeMode === "pipeline"}
|
||||
tools={tools}
|
||||
selectableTools={
|
||||
form.runtimeMode === "realtime"
|
||||
? tools.filter((tool) =>
|
||||
realtimeToolFeatures?.externalTypes.includes(tool.type),
|
||||
realtimeToolFeatures?.externalTypes.some(type => type === tool.type),
|
||||
)
|
||||
: tools
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user