File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
gui/src/components/ChatForm Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -148,8 +148,8 @@ pub struct CodeAssistantCaps {
148148 pub running_models : Vec < String > , // check there if a model is available or not, not in other places
149149 #[ serde( default ) ]
150150 pub caps_version : i64 , // need to reload if it increases on server, that happens when server configuration changes
151- // #[serde(default)]
152- // pub code_chat_default_system_prompt: String,
151+ #[ serde( default ) ]
152+ pub code_chat_default_system_prompt : String ,
153153
154154 #[ serde( default ) ]
155155 pub customization : String , // on self-hosting server, allows to customize yaml_configs & friends for all engineers
Original file line number Diff line number Diff line change 66 useAppDispatch ,
77 useAppSelector ,
88 useGetPromptsQuery ,
9+ useGetCapsQuery ,
910} from "../../hooks" ;
1011import { getSelectedSystemPrompt } from "../../features/Chat/Thread/selectors" ;
1112import { setSystemPrompt } from "../../features/Chat/Thread/actions" ;
@@ -30,8 +31,10 @@ export const PromptSelect: React.FC = () => {
3031 [ onSetSelectedSystemPrompt , promptsRequest . data ] ,
3132 ) ;
3233
34+ const caps = useGetCapsQuery ( ) ;
35+ const default_system_prompt = caps . data ?. code_chat_default_system_prompt ?? "default" ;
3336 const val = useMemo (
34- ( ) => Object . keys ( selectedSystemPrompt ) [ 0 ] ?? "default" ,
37+ ( ) => Object . keys ( selectedSystemPrompt ) [ 0 ] ?? default_system_prompt ,
3538 [ selectedSystemPrompt ] ,
3639 ) ;
3740
You can’t perform that action at this time.
0 commit comments