fix(web): 链相位语义色/失败可重试 + 模板填入中文标签/删除可撤销/工具卡文案 + 模板库 PageHeader
This commit is contained in:
@@ -320,3 +320,17 @@ export function resolveLegacyRoute(
|
||||
export function isLegacyTool(tool: Readonly<ToolDescriptorView>): boolean {
|
||||
return tool.is_legacy && !!tool.legacy_route;
|
||||
}
|
||||
|
||||
// —— 「关联工具」下拉选项 ——
|
||||
// 工具描述符 → 下拉选项(value=key 用于 tool_key 关联,label=中文标题供展示,不暴露英文 key)。
|
||||
// 模板库「关联生成器」字段据此从纯文本框升级为 Select。
|
||||
export interface ToolKeyOption {
|
||||
key: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
export function toolKeyOptions(
|
||||
tools: readonly ToolDescriptorView[] | undefined,
|
||||
): ToolKeyOption[] {
|
||||
return (tools ?? []).map((tool) => ({ key: tool.key, title: tool.title }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user