File tree Expand file tree Collapse file tree
packages/ui/src/components/editor/panel/prompts/PromptField/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "name" : " gemini-coder" ,
33 "displayName" : " Code Web Chat" ,
44 "description" : " The fastest way to code with AI (CWC)" ,
5- "version" : " 1.887 .0" ,
5+ "version" : " 1.888 .0" ,
66 "scripts" : {
77 "build" : " npx vsce package --no-dependencies" ,
88 "vscode:prepublish" : " rimraf out && npm run compile" ,
Original file line number Diff line number Diff line change @@ -82,22 +82,17 @@ export const use_ghost_text = (params: {
8282 pre_caret_range . selectNodeContents ( params . input_ref . current )
8383 pre_caret_range . setEnd ( range . startContainer , range . startOffset )
8484 const text_before_cursor = pre_caret_range . toString ( )
85- const last_word_match = text_before_cursor . match ( / [ \S ] + $ / )
85+ const last_word_match = text_before_cursor . match (
86+ / [ a - z A - Z _ ] [ a - z A - Z 0 - 9 _ ] * $ /
87+ )
8688
8789 if ( last_word_match ) {
88- const last_word_with_prefix = last_word_match [ 0 ]
89- const word_start_match =
90- last_word_with_prefix . match ( / [ a - z A - Z _ ] / )
91- if ( word_start_match ) {
92- const last_word = last_word_with_prefix . substring (
93- word_start_match . index ?? 0
94- )
95- if ( last_word . length >= 2 ) {
96- for ( const id of identifiers ) {
97- if ( id . startsWith ( last_word ) && id !== last_word ) {
98- potential_ghost_text = id . substring ( last_word . length )
99- break
100- }
90+ const last_word = last_word_match [ 0 ]
91+ if ( last_word . length >= 2 ) {
92+ for ( const id of identifiers ) {
93+ if ( id . startsWith ( last_word ) && id !== last_word ) {
94+ potential_ghost_text = id . substring ( last_word . length )
95+ break
10196 }
10297 }
10398 }
You can’t perform that action at this time.
0 commit comments