File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "engines" : {
66 "vscode" : " ^1.109.0"
77 },
8- "version" : " 0.3.2 " ,
8+ "version" : " 0.3.3 " ,
99 "preview" : true ,
1010 "serverInfo" : {
1111 "name" : " FineCode" ,
Original file line number Diff line number Diff line change @@ -120,21 +120,19 @@ export class FineCodeActionsProvider
120120 . sendRequest ( lsProtocol . ExecuteCommandRequest . method , requestParams )
121121 . then ( ( response ) => {
122122 console . log ( 'resp' , response ) ;
123- // TODO: investigate why this occurs: we get empty object at start
124- if ( Object . keys ( < FinecodeGetActionsResponse > response ) . length > 0 ) {
125- this . actions = < FinecodeGetActionsResponse > response ;
126- // this.loaded = true;
127-
128- const saveActionsById = ( actions : ActionTreeNode [ ] ) : void => {
129- for ( const action of actions ) {
130- this . actionById [ action . nodeId ] = action ;
131- saveActionsById ( action . subnodes ) ;
132- }
133- } ;
134- saveActionsById ( this . actions . nodes ) ;
135- } else {
123+ this . actions = response as FinecodeGetActionsResponse ;
124+
125+ const saveActionsById = ( actions : ActionTreeNode [ ] ) : void => {
126+ for ( const action of actions ) {
127+ this . actionById [ action . nodeId ] = action ;
128+ saveActionsById ( action . subnodes ) ;
129+ }
130+ } ;
131+ saveActionsById ( this . actions . nodes ) ;
132+
133+ if ( this . actions . nodes . length === 0 ) {
134+ // TODO: investigate why this occurs: we get empty object at start
136135 this . actions = { nodes : [ ] } ;
137- // this.loaded = false;
138136 }
139137 resolve ( ) ;
140138 } )
You can’t perform that action at this time.
0 commit comments