57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
export const MASTER_AGENT_CHAT_PAGE_ANCHORS = {
|
|
prompt: "/me/master-agent#prompt-section",
|
|
model: "/me/master-agent#model-section",
|
|
reasoningEffort: "/me/master-agent#reasoning-effort-section",
|
|
memory: "/me/master-agent#memory-section",
|
|
} as const;
|
|
|
|
export const MASTER_AGENT_TAKEOVER_PAGE_HREF = "/me/master-agent/takeover";
|
|
|
|
export type MasterAgentChatPageAnchors = typeof MASTER_AGENT_CHAT_PAGE_ANCHORS;
|
|
|
|
export type MasterAgentChatMenuItem = {
|
|
key: "prompt" | "model" | "reasoning_effort" | "takeover" | "memory" | "refresh";
|
|
label: string;
|
|
href?: string;
|
|
action?: "refresh";
|
|
};
|
|
|
|
export function getMasterAgentChatMenuItems(projectId: string): MasterAgentChatMenuItem[] {
|
|
if (projectId !== "master-agent") {
|
|
return [];
|
|
}
|
|
|
|
return [
|
|
{
|
|
key: "model",
|
|
label: "模型",
|
|
href: MASTER_AGENT_CHAT_PAGE_ANCHORS.model,
|
|
},
|
|
{
|
|
key: "reasoning_effort",
|
|
label: "推理强度",
|
|
href: MASTER_AGENT_CHAT_PAGE_ANCHORS.reasoningEffort,
|
|
},
|
|
{
|
|
key: "takeover",
|
|
label: "全局接管",
|
|
href: MASTER_AGENT_TAKEOVER_PAGE_HREF,
|
|
},
|
|
{
|
|
key: "prompt",
|
|
label: "提示词",
|
|
href: MASTER_AGENT_CHAT_PAGE_ANCHORS.prompt,
|
|
},
|
|
{
|
|
key: "memory",
|
|
label: "记忆",
|
|
href: MASTER_AGENT_CHAT_PAGE_ANCHORS.memory,
|
|
},
|
|
{
|
|
key: "refresh",
|
|
label: "刷新",
|
|
action: "refresh",
|
|
},
|
|
];
|
|
}
|