more merge and typescript fixes
This commit is contained in:
parent
bb90e7870b
commit
3399fbe7b1
4 changed files with 27 additions and 16 deletions
17
core/core.ts
17
core/core.ts
|
|
@ -252,6 +252,7 @@ export class Core {
|
|||
this.registerMessageHandlers(ideSettingsPromise);
|
||||
}
|
||||
|
||||
/* eslint-disable max-lines-per-function */
|
||||
private registerMessageHandlers(ideSettingsPromise: Promise<IdeSettings>) {
|
||||
const on = this.messenger.on.bind(this.messenger);
|
||||
|
||||
|
|
@ -626,14 +627,18 @@ export class Core {
|
|||
});
|
||||
|
||||
on("didChangeSelectedProfile", async (msg) => {
|
||||
await this.configHandler.setSelectedProfileId(msg.data.id);
|
||||
if (msg.data.id) {
|
||||
await this.configHandler.setSelectedProfileId(msg.data.id);
|
||||
}
|
||||
});
|
||||
|
||||
on("didChangeSelectedOrg", async (msg) => {
|
||||
await this.configHandler.setSelectedOrgId(
|
||||
msg.data.id,
|
||||
msg.data.profileId,
|
||||
);
|
||||
if (msg.data.id) {
|
||||
await this.configHandler.setSelectedOrgId(
|
||||
msg.data.id,
|
||||
msg.data.profileId || undefined,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
on("didChangeControlPlaneSessionInfo", async (msg) => {
|
||||
|
|
@ -686,7 +691,7 @@ export class Core {
|
|||
toolCallId: string,
|
||||
contextItems: any[]
|
||||
}) => {
|
||||
this.messenger.send("toolCallPartialOutput", params);
|
||||
this.messenger.send("toolCallPartialOutput" as any, params);
|
||||
};
|
||||
|
||||
const contextItems = await callTool(
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
// extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt
|
||||
export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] =
|
||||
[
|
||||
"toolCallPartialOutput",
|
||||
"ping",
|
||||
"abort",
|
||||
"history/list",
|
||||
|
|
|
|||
|
|
@ -40,4 +40,8 @@ export type ToWebviewFromIdeOrCoreProtocol = {
|
|||
getWebviewHistoryLength: [undefined, number];
|
||||
getCurrentSessionId: [undefined, string];
|
||||
"jetbrains/setColors": [Record<string, string>, void];
|
||||
toolCallPartialOutput: [
|
||||
{ toolCallId: string; contextItems: any[] },
|
||||
void,
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ import {
|
|||
newSession,
|
||||
selectIsInEditMode,
|
||||
selectIsSingleRangeEditOrInsertion,
|
||||
setInactive,
|
||||
updateToolCallOutput,
|
||||
updateToolCallOutput
|
||||
} from "../../redux/slices/sessionSlice";
|
||||
import {
|
||||
setDialogEntryOn,
|
||||
|
|
@ -278,14 +277,16 @@ export function Chat() {
|
|||
useWebviewListener(
|
||||
"toolCallPartialOutput",
|
||||
async (data) => {
|
||||
console.log("toolCallPartialOutput", data);
|
||||
// Update tool call output in Redux store
|
||||
dispatch(
|
||||
updateToolCallOutput({
|
||||
toolCallId: data.toolCallId,
|
||||
contextItems: data.contextItems,
|
||||
}),
|
||||
);
|
||||
if (data && typeof data === "object" && "toolCallId" in data && "contextItems" in data) {
|
||||
console.log("toolCallPartialOutput", data);
|
||||
// Update tool call output in Redux store
|
||||
dispatch(
|
||||
updateToolCallOutput({
|
||||
toolCallId: data.toolCallId,
|
||||
contextItems: data.contextItems,
|
||||
}),
|
||||
);
|
||||
}
|
||||
},
|
||||
[dispatch],
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue