Skip to content

Commit 0afa009

Browse files
committed
v0.3.3: adapt to changes in FineCode LSP protocol (camel case in action tree messages)
1 parent 18d67d9 commit 0afa009

2 files changed

Lines changed: 13 additions & 15 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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",

src/action-tree-provider.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff 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
})

0 commit comments

Comments
 (0)