fix(app): move reload agent away from close action
This commit is contained in:
@@ -39,10 +39,10 @@ describe("buildWorkspaceTabMenuEntries", () => {
|
|||||||
expect(entries.filter((entry) => entry.kind === "item").map((entry) => entry.label)).toEqual([
|
expect(entries.filter((entry) => entry.kind === "item").map((entry) => entry.label)).toEqual([
|
||||||
"Copy resume command",
|
"Copy resume command",
|
||||||
"Copy agent id",
|
"Copy agent id",
|
||||||
"Reload agent",
|
|
||||||
"Close to the left",
|
"Close to the left",
|
||||||
"Close to the right",
|
"Close to the right",
|
||||||
"Close other tabs",
|
"Close other tabs",
|
||||||
|
"Reload agent",
|
||||||
"Close",
|
"Close",
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
@@ -66,10 +66,10 @@ describe("buildWorkspaceTabMenuEntries", () => {
|
|||||||
expect(entries.filter((entry) => entry.kind === "item").map((entry) => entry.label)).toEqual([
|
expect(entries.filter((entry) => entry.kind === "item").map((entry) => entry.label)).toEqual([
|
||||||
"Copy resume command",
|
"Copy resume command",
|
||||||
"Copy agent id",
|
"Copy agent id",
|
||||||
"Reload agent",
|
|
||||||
"Close tabs above",
|
"Close tabs above",
|
||||||
"Close tabs below",
|
"Close tabs below",
|
||||||
"Close other tabs",
|
"Close other tabs",
|
||||||
|
"Reload agent",
|
||||||
"Close",
|
"Close",
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -135,17 +135,6 @@ export function buildWorkspaceTabMenuEntries(
|
|||||||
void onCopyAgentId(agentId);
|
void onCopyAgentId(agentId);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
entries.push({
|
|
||||||
kind: "item",
|
|
||||||
key: "reload-agent",
|
|
||||||
label: "Reload agent",
|
|
||||||
icon: "rotate-cw",
|
|
||||||
tooltip: "Reload agent to update skills, MCPs or login status.",
|
|
||||||
testID: `${menuTestIDBase}-reload-agent`,
|
|
||||||
onSelect: () => {
|
|
||||||
void onReloadAgent(agentId);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
entries.push({
|
entries.push({
|
||||||
kind: "separator",
|
kind: "separator",
|
||||||
key: "copy-separator",
|
key: "copy-separator",
|
||||||
@@ -185,6 +174,20 @@ export function buildWorkspaceTabMenuEntries(
|
|||||||
void onCloseOtherTabs(tab.tabId);
|
void onCloseOtherTabs(tab.tabId);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
if (tab.target.kind === "agent") {
|
||||||
|
const { agentId } = tab.target;
|
||||||
|
entries.push({
|
||||||
|
kind: "item",
|
||||||
|
key: "reload-agent",
|
||||||
|
label: "Reload agent",
|
||||||
|
icon: "rotate-cw",
|
||||||
|
tooltip: "Reload agent to update skills, MCPs or login status.",
|
||||||
|
testID: `${menuTestIDBase}-reload-agent`,
|
||||||
|
onSelect: () => {
|
||||||
|
void onReloadAgent(agentId);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
entries.push({
|
entries.push({
|
||||||
kind: "item",
|
kind: "item",
|
||||||
key: "close",
|
key: "close",
|
||||||
|
|||||||
Reference in New Issue
Block a user