diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 1e4306b657..d274d09cc1 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -263,6 +263,13 @@ "icon": "$(history)", "group": "PearAI" }, + { + "command": "pearai.viewHistorySearch", + "category": "PearAI", + "title": "View Search History", + "icon": "$(history)", + "group": "PearAI" + }, { "command": "pearai.writeCommentsForCode", "category": "PearAI", @@ -599,6 +606,11 @@ "command": "pearai.viewHistory", "group": "navigation@1", "when": "view == pearai.chatView" + }, + { + "command": "pearai.viewHistorySearch", + "group": "navigation@1", + "when": "view == pearai.searchView" } ], "editor/title": [ diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 4ed37414db..55517cfa65 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -587,6 +587,11 @@ const commandsMap: ( "pearai.chatView", ]); }, + "pearai.viewHistorySearch": () => { + sidebar.webviewProtocol?.request("viewHistory", undefined, [ + "pearai.searchView", + ]); + }, "pearai.toggleFullScreen": () => { // Check if full screen is already open by checking open tabs const fullScreenTab = getFullScreenTab(); @@ -1039,3 +1044,4 @@ export function registerAllCommands( ); } } + diff --git a/gui/src/App.tsx b/gui/src/App.tsx index cd0d2f6018..aa6ab62671 100644 --- a/gui/src/App.tsx +++ b/gui/src/App.tsx @@ -63,7 +63,12 @@ const router = createMemoryRouter( }, { path: "/history", - element: , + element: }, { path: "/stats", diff --git a/gui/src/pages/history.tsx b/gui/src/pages/history.tsx index d91c8b42c9..38e837166a 100644 --- a/gui/src/pages/history.tsx +++ b/gui/src/pages/history.tsx @@ -136,11 +136,12 @@ function TableRow({ // Save current session saveSession(); await loadSession(session.sessionId); - if (from === 'continue') { - navigate("/"); - } else { - onClose(); - } + navigate("/"); + // if (from === 'continue') { + // navigate("/"); + // } else { + // onClose(); + // } }} >