File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 642642 "default" : 5
643643 },
644644 "codeWebChat.contextSizeWarningThreshold" : {
645- "type" : " number"
645+ "type" : " number" ,
646+ "scope" : " resource"
646647 },
647648 "codeWebChat.checkpointLifespan" : {
648649 "type" : " number" ,
Original file line number Diff line number Diff line change @@ -860,10 +860,9 @@ export class PanelProvider implements vscode.WebviewViewProvider {
860860 private _send_context_size_warning_threshold ( ) {
861861 if ( ! this . _webview_view ) return
862862 const config = vscode . workspace . getConfiguration ( 'codeWebChat' )
863- const threshold = config . get < number > (
864- 'contextSizeWarningThreshold' ,
863+ const threshold =
864+ config . get < number > ( 'contextSizeWarningThreshold' ) ||
865865 DEFAULT_CONTEXT_SIZE_WARNING_THRESHOLD
866- )
867866 this . send_message ( {
868867 command : 'CONTEXT_SIZE_WARNING_THRESHOLD' ,
869868 threshold
Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ export const handle_get_context_size_warning_threshold = async (
66 provider : SettingsProvider
77) : Promise < void > => {
88 const config = vscode . workspace . getConfiguration ( 'codeWebChat' )
9- const threshold = config . get < number > (
10- 'contextSizeWarningThreshold' ,
9+ const threshold =
10+ config . get < number > ( 'contextSizeWarningThreshold' ) ||
1111 DEFAULT_CONTEXT_SIZE_WARNING_THRESHOLD
12- )
1312 provider . postMessage ( {
1413 command : 'CONTEXT_SIZE_WARNING_THRESHOLD' ,
1514 threshold
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export const use_settings = (vscode: any) => {
3939 set_edit_context_system_instructions
4040 ] = useState < string | undefined > ( undefined )
4141 const [ context_size_warning_threshold , set_context_size_warning_threshold ] =
42- useState < number | undefined > ( undefined )
42+ useState < number > ( )
4343 const [ edit_format_instructions , set_edit_format_instructions ] = useState <
4444 EditFormatInstructions | undefined
4545 > ( undefined )
You can’t perform that action at this time.
0 commit comments