Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs in CI #97

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"typescript.tsc.autoDetect": "off",
"cmake.configureOnOpen": true,
"cSpell.words": [
"datas",
"hoverable",
"treesitter"
]
}
}
6 changes: 6 additions & 0 deletions gui-sidebar/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import useSubmenuContextProviders from "./hooks/useSubmenuContextProviders";
import { useVscTheme } from "./hooks/useVscTheme";
import Stats from "./pages/stats";

import CodeContextPanel from "./pages/codeContextPanel";

const router = createMemoryRouter([
{
path: "/",
Expand All @@ -35,6 +37,10 @@ const router = createMemoryRouter([
{
path: "/history",
element: <History />,
},
{
path: "/CodeContextPanel",
element: <CodeContextPanel />,
},
{
path: "/stats",
Expand Down
13 changes: 13 additions & 0 deletions gui-sidebar/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,19 @@ const Layout = () => {
},
[location, navigate],
);
useWebviewListener(
"viewDataStorage",
async () => {
// Toggle the history page / main page
if (location.pathname === "/CodeContextPanel") {
navigate("/");
} else {
navigate("/CodeContextPanel");
}
},
[location, navigate],
);


useWebviewListener("indexProgress", async (data) => {
setIndexingProgress(data.progress);
Expand Down
13 changes: 13 additions & 0 deletions gui-sidebar/src/hooks/useNavigationListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,17 @@ export const useNavigationListener = () => {
},
[location, navigate]
);
useWebviewListener(
"viewDataStorage",
async () => {
// Toggle the history page / main page
if (location.pathname === "/viewDataStorage") {
navigate("/");
} else {
navigate("/codeContextPanel");
}
},
[location, navigate]
);

};
Loading