Skip to content

Commit 64f9000

Browse files
nang-devnang-dev2Himanshu-Singh-Chauhan
committed
Aider state robustness (#190)
* Progress * Big progress * More progress * More progress * More progress * Wokring on mac openai * Added back default, still working * Added should be working for windows * Added singleton * reset aider output * pipx * Added sudo * Cleaned up and added start and kill --------- Co-authored-by: nang-dev <[email protected]> Co-authored-by: Himanshu <[email protected]>
1 parent 300a562 commit 64f9000

File tree

9 files changed

+740
-657
lines changed

9 files changed

+740
-657
lines changed

core/llm/llms/AiderLLM.ts

Lines changed: 43 additions & 441 deletions
Large diffs are not rendered by default.

core/protocol/ideWebview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & {
2929
addPerplexityContextinChat: [{ text: string, language: string }, void];
3030
aiderMode: [undefined, void];
3131
aiderCtrlC: [undefined, void];
32+
sendAiderProcessStateToGUI: [undefined, void];
3233
aiderResetSession: [undefined, void];
33-
refreshAiderProcessState: [undefined, void];
3434
toggleDevTools: [undefined, void];
3535
reloadWindow: [undefined, void];
3636
focusEditor: [undefined, void];

extensions/vscode/src/commands.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { QuickEdit, QuickEditShowParams } from "./quickEdit/QuickEditQuickPick";
2929
import { Battery } from "./util/battery";
3030
import type { VsCodeWebviewProtocol } from "./webviewProtocol";
3131
import { getExtensionUri } from "./util/vscode";
32-
import { aiderCtrlC, aiderResetSession, openAiderPanel, refreshAiderProcessState, installAider, uninstallAider } from './integrations/aider/aiderUtil';
32+
import { aiderCtrlC, aiderResetSession, openAiderPanel, sendAiderProcessStateToGUI, installAider, uninstallAider } from './integrations/aider/aiderUtil';
3333
import { handlePerplexityMode } from "./integrations/perplexity/perplexity";
3434
import { PEAR_CONTINUE_VIEW_ID } from "./ContinueGUIWebviewViewProvider";
3535
import { handleIntegrationShortcutKey } from "./util/integrationUtils";
@@ -376,6 +376,7 @@ const commandsMap: (
376376
core.invoke("context/indexDocs", { reIndex: true });
377377
},
378378
"pearai.toggleCreator": async () => {
379+
await sendAiderProcessStateToGUI(core, sidebar.webviewProtocol);
379380
await handleIntegrationShortcutKey("navigateToCreator", "aiderMode", sidebar, [PEAR_OVERLAY_VIEW_ID]);
380381
},
381382
"pearai.toggleSearch": async () => {
@@ -650,11 +651,11 @@ const commandsMap: (
650651
"pearai.aiderResetSession": async () => {
651652
await aiderResetSession(core);
652653
},
653-
"pearai.refreshAiderProcessState": async () => {
654-
await refreshAiderProcessState(core, sidebar.webviewProtocol);
654+
"pearai.sendAiderProcessStateToGUI": async () => {
655+
await sendAiderProcessStateToGUI(core, sidebar.webviewProtocol);
655656
},
656-
"pearai.setAiderProcessState": async (state: AiderState["state"]) => {
657-
sidebar.webviewProtocol?.request("setAiderProcessStateInGUI", { state: state }, [PEAR_OVERLAY_VIEW_ID]);
657+
"pearai.setAiderProcessState": async (state: AiderState) => {
658+
sidebar.webviewProtocol?.request("setAiderProcessStateInGUI", state, [PEAR_OVERLAY_VIEW_ID]);
658659
},
659660
"pearai.perplexityMode": async () => {
660661
// handlePerplexityMode(sidebar, extensionContext);

extensions/vscode/src/extension/VsCodeMessenger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ export class VsCodeMessenger {
220220
this.onWebview("aiderResetSession", (msg) => {
221221
vscode.commands.executeCommand("pearai.aiderResetSession");
222222
});
223-
this.onWebview("refreshAiderProcessState", (msg) => {
224-
vscode.commands.executeCommand("pearai.refreshAiderProcessState");
223+
this.onWebview("sendAiderProcessStateToGUI", (msg) => {
224+
vscode.commands.executeCommand("pearai.sendAiderProcessStateToGUI");
225225
}),
226226
this.onWebview("toggleDevTools", (msg) => {
227227
vscode.commands.executeCommand("workbench.action.toggleDevTools");

0 commit comments

Comments
 (0)