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

WorkspaceService data save change to sqlLite from json #96

Closed
wants to merge 6 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
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"typescript.tsc.autoDetect": "off",
"cmake.configureOnOpen": true,
"cSpell.words": [
"datas",
"hoverable",
"treesitter"
]
}
],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把别的插件的配置不要复制上来

"Codegeex.RepoIndex": true
}
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
Loading