diff options
author | Kirill Dubovitskiy <kirill2003de@gmail.com> | 2023-08-08 22:58:03 -0700 |
---|---|---|
committer | Kirill Dubovitskiy <kirill2003de@gmail.com> | 2023-08-08 22:59:22 -0700 |
commit | ac14b40bbd93ccea991bb81615ed5ea0a1f29a86 (patch) | |
tree | fd8e6eefb0f07cb4d6d83f71799b5f42ede72ada /extension/react-app/src/redux | |
parent | 47c19fa8da8b459c4cfc1d9a535c6cadaa5fa5ec (diff) | |
download | sncontinue-ac14b40bbd93ccea991bb81615ed5ea0a1f29a86.tar.gz sncontinue-ac14b40bbd93ccea991bb81615ed5ea0a1f29a86.tar.bz2 sncontinue-ac14b40bbd93ccea991bb81615ed5ea0a1f29a86.zip |
Fixed an issue with files from other workspaces showing up in @context search
- Adding workspace folder information to react-app that uses
- Adding workspace_dir to the meilisearch documents
- Keeping the original singlton index as that requires a bigger change
- Truncated the context descriptions from absolute paths to only include path relative to workspace directory
Note:
I have freely changed the store.config model from workspacePath to workspacePaths as it was unused, can't think of a way how it would backfire at the moment with older versions that might have been using it. Might be missing something here
Diffstat (limited to 'extension/react-app/src/redux')
-rw-r--r-- | extension/react-app/src/redux/slices/configSlice.ts | 8 | ||||
-rw-r--r-- | extension/react-app/src/redux/store.ts | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/extension/react-app/src/redux/slices/configSlice.ts b/extension/react-app/src/redux/slices/configSlice.ts index 59c76066..9cf5402f 100644 --- a/extension/react-app/src/redux/slices/configSlice.ts +++ b/extension/react-app/src/redux/slices/configSlice.ts @@ -7,13 +7,13 @@ export const configSlice = createSlice({ apiUrl: "http://localhost:65432", } as RootStore["config"], reducers: { - setWorkspacePath: ( + setWorkspacePaths: ( state: RootStore["config"], - action: { type: string; payload: string } + action: { type: string; payload: string[] } ) => { return { ...state, - workspacePath: action.payload, + workspacePaths: action.payload, }; }, setApiUrl: ( @@ -57,7 +57,7 @@ export const configSlice = createSlice({ export const { setVscMachineId, setApiUrl, - setWorkspacePath, + setWorkspacePaths, setSessionId, setVscMediaUrl, setDataSwitchOn, diff --git a/extension/react-app/src/redux/store.ts b/extension/react-app/src/redux/store.ts index 59339060..bd6759e4 100644 --- a/extension/react-app/src/redux/store.ts +++ b/extension/react-app/src/redux/store.ts @@ -14,7 +14,7 @@ export interface ChatMessage { export interface RootStore { config: { - workspacePath: string | undefined; + workspacePaths: string[] | undefined; apiUrl: string; vscMachineId: string | undefined; sessionId: string | undefined; |