refactor(command): remove history command
This commit is contained in:
1 parent
efec4a608d
commit
c927808aff
30 files changed
+58
-278
No files matched your search
@@ -840,9 +840,9 @@ describe("NanobotTui composer", () => {
|
||||
}
|
||||
}
|
||||
ui.commandMenu.setCommands([{
|
||||
command: "/history",
|
||||
command: "/inspect",
|
||||
title: "History",
|
||||
description: "Show recent messages",
|
||||
description: "Inspect a session",
|
||||
argHint: "[n]",
|
||||
lifecycle: "side_channel",
|
||||
acceptsArgs: true,
|
||||
@@ -852,7 +852,7 @@ describe("NanobotTui composer", () => {
|
||||
expect(ui.commandMenu.visible).toBe(true)
|
||||
setup.mockInput.pressTab()
|
||||
|
||||
expect(ui.composer.plainText).toBe("/history ")
|
||||
expect(ui.composer.plainText).toBe("/inspect ")
|
||||
expect(ui.commandMenu.visible).toBe(false)
|
||||
expect(sent).toEqual([])
|
||||
})
|
||||
|
||||
@@ -1218,9 +1218,9 @@ describe("gateway protocol", () => {
|
||||
return Promise.resolve(new Response(JSON.stringify({
|
||||
commands: [
|
||||
{
|
||||
command: "/history",
|
||||
command: "/inspect",
|
||||
title: "History",
|
||||
description: "Show recent messages",
|
||||
description: "Inspect a session",
|
||||
arg_hint: "[n]",
|
||||
accepts_args: true,
|
||||
lifecycle: "side_channel",
|
||||
@@ -1232,9 +1232,9 @@ describe("gateway protocol", () => {
|
||||
|
||||
try {
|
||||
expect(await fetchSlashCommands("http://nanobot.test", "secret")).toEqual([{
|
||||
command: "/history",
|
||||
command: "/inspect",
|
||||
title: "History",
|
||||
description: "Show recent messages",
|
||||
description: "Inspect a session",
|
||||
argHint: "[n]",
|
||||
lifecycle: "side_channel",
|
||||
acceptsArgs: true,
|
||||
|
||||
@@ -15,9 +15,9 @@ const commands: SlashCommand[] = [
|
||||
acceptsArgs: false,
|
||||
},
|
||||
{
|
||||
command: "/history",
|
||||
command: "/inspect",
|
||||
title: "History",
|
||||
description: "Show recent messages",
|
||||
description: "Inspect a session",
|
||||
argHint: "[n]",
|
||||
lifecycle: "side_channel",
|
||||
acceptsArgs: true,
|
||||
@@ -54,11 +54,11 @@ describe("CommandMenu", () => {
|
||||
|
||||
const frame = setup.captureCharFrame()
|
||||
expect(frame).toContain("› /help")
|
||||
expect(frame).toContain("/history [n]")
|
||||
expect(frame).toContain("/inspect [n]")
|
||||
expect(menu.completion("/h")).toBe("/help")
|
||||
|
||||
expect(menu.move(1)).toBe(true)
|
||||
expect(menu.complete()).toBe("/history ")
|
||||
expect(menu.complete()).toBe("/inspect ")
|
||||
expect(menu.visible).toBe(false)
|
||||
})
|
||||
|
||||
@@ -100,7 +100,7 @@ describe("CommandMenu", () => {
|
||||
menu.setCommands(commands)
|
||||
menu.update("explain /help")
|
||||
expect(menu.visible).toBe(false)
|
||||
menu.update("/history 5")
|
||||
menu.update("/inspect 5")
|
||||
expect(menu.visible).toBe(false)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user