chore: remove unused server state
This commit is contained in:
parent
611419dfa2
commit
729cb2f44f
4 changed files with 4 additions and 65 deletions
5
extensions/vscode/package-lock.json
generated
5
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.235",
|
||||
"version": "0.9.236",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.235",
|
||||
"version": "0.9.236",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
@ -109,6 +109,7 @@
|
|||
"cheerio": "^1.0.0-rc.12",
|
||||
"commander": "^12.0.0",
|
||||
"comment-json": "^4.2.3",
|
||||
"dbinfoz": "^0.14.0",
|
||||
"diff": "^7.0.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default function WorkingSet() {
|
|||
));
|
||||
|
||||
return (
|
||||
<div className="bg-vsc-editor-background border-vsc-input-border mx-1 flex flex-col rounded-t-lg border border-b-0 border-solid p-1">
|
||||
<div className="bg-vsc-editor-background mx-1 flex flex-col rounded-t-lg p-1">
|
||||
<div className="text-lightgray flex items-center justify-between gap-1.5 py-1.5 pl-3 pr-2 text-xs">
|
||||
<span>{title}</span>
|
||||
<AddFileButton />
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
||||
import {
|
||||
ContextProviderDescription,
|
||||
ContinueConfig,
|
||||
SlashCommandDescription,
|
||||
} from "core";
|
||||
|
||||
type ServerState = {
|
||||
meilisearchUrl: string | undefined;
|
||||
slashCommands: SlashCommandDescription[];
|
||||
selectedContextItems: any[];
|
||||
config: ContinueConfig;
|
||||
contextProviders: ContextProviderDescription[];
|
||||
savedContextGroups: any[]; // TODO: Context groups
|
||||
indexingProgress: number;
|
||||
};
|
||||
|
||||
const initialState: ServerState = {
|
||||
meilisearchUrl: undefined,
|
||||
slashCommands: [],
|
||||
selectedContextItems: [],
|
||||
config: {
|
||||
models: [],
|
||||
} as any,
|
||||
contextProviders: [],
|
||||
savedContextGroups: [],
|
||||
indexingProgress: 1.0,
|
||||
};
|
||||
|
||||
export const serverStateSlice = createSlice({
|
||||
name: "serverState",
|
||||
initialState,
|
||||
reducers: {
|
||||
setSlashCommands: (
|
||||
state,
|
||||
action: PayloadAction<ServerState["slashCommands"]>,
|
||||
) => {
|
||||
state.slashCommands = [
|
||||
...action.payload,
|
||||
{ name: "codebase", description: "Retrieve codebase context" },
|
||||
];
|
||||
},
|
||||
setContextProviders: (
|
||||
state,
|
||||
action: PayloadAction<ServerState["contextProviders"]>,
|
||||
) => {
|
||||
state.contextProviders = action.payload;
|
||||
},
|
||||
setIndexingProgress: (
|
||||
state,
|
||||
action: PayloadAction<ServerState["indexingProgress"]>,
|
||||
) => {
|
||||
state.indexingProgress = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setContextProviders, setSlashCommands, setIndexingProgress } =
|
||||
serverStateSlice.actions;
|
||||
export default serverStateSlice.reducer;
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import { combineReducers, configureStore } from "@reduxjs/toolkit";
|
||||
import configReducer from "./slices/configSlice";
|
||||
import miscReducer from "./slices/miscSlice";
|
||||
import serverStateReducer from "./slices/serverStateReducer";
|
||||
import stateReducer from "./slices/stateSlice";
|
||||
import uiStateReducer from "./slices/uiStateSlice";
|
||||
|
||||
|
|
@ -20,7 +19,6 @@ const rootReducer = combineReducers({
|
|||
config: configReducer,
|
||||
misc: miscReducer,
|
||||
uiState: uiStateReducer,
|
||||
serverState: serverStateReducer,
|
||||
editModeState: editModeStateReducer,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue