summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/react-app/src/components/PillButton.tsx4
-rw-r--r--extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts2
-rw-r--r--extension/react-app/src/hooks/ContinueGUIClientProtocol.ts4
-rw-r--r--extension/src/continueIdeClient.ts16
4 files changed, 22 insertions, 4 deletions
diff --git a/extension/react-app/src/components/PillButton.tsx b/extension/react-app/src/components/PillButton.tsx
index ae744c44..8e5f896e 100644
--- a/extension/react-app/src/components/PillButton.tsx
+++ b/extension/react-app/src/components/PillButton.tsx
@@ -168,7 +168,9 @@ const PillButton = (props: PillButtonProps) => {
data-tooltip-id={`edit-${props.index}`}
backgroundColor={"#8800aa55"}
onClick={() => {
- client?.setEditingAtIndices([props.index]);
+ client?.setEditingAtIds([
+ props.item.description.id.item_id,
+ ]);
}}
>
<PaintBrushIcon style={{ margin: "auto" }} width="1.6em" />
diff --git a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
index 8e3735ec..8d8b7b7e 100644
--- a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
@@ -23,7 +23,7 @@ abstract class AbstractContinueGUIClientProtocol {
abstract deleteContextWithIds(ids: ContextItemId[]): void;
- abstract setEditingAtIndices(indices: number[]): void;
+ abstract setEditingAtIds(ids: string[]): void;
abstract toggleAddingHighlightedCode(): void;
diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
index 5a5d4c30..b6dd43d9 100644
--- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
@@ -78,8 +78,8 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
});
}
- setEditingAtIndices(indices: number[]) {
- this.messenger.send("set_editing_at_indices", { indices });
+ setEditingAtIds(ids: string[]) {
+ this.messenger.send("set_editing_at_ids", { ids });
}
toggleAddingHighlightedCode(): void {
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts
index 498cf9de..a0ce009c 100644
--- a/extension/src/continueIdeClient.ts
+++ b/extension/src/continueIdeClient.ts
@@ -192,6 +192,8 @@ class IdeProtocolClient {
});
}
+ visibleMessages: Set<string> = new Set();
+
async handleMessage(
messageType: string,
data: any,
@@ -254,6 +256,20 @@ class IdeProtocolClient {
this.openFile(data.filepath);
// TODO: Close file if False
break;
+ case "showMessage":
+ if (!this.visibleMessages.has(data.message)) {
+ this.visibleMessages.add(data.message);
+ vscode.window
+ .showInformationMessage(data.message, "Copy Traceback", "View Logs")
+ .then((selection) => {
+ if (selection === "View Logs") {
+ vscode.commands.executeCommand("continue.viewLogs");
+ } else if (selection === "Copy Traceback") {
+ vscode.env.clipboard.writeText(data.message);
+ }
+ });
+ }
+ break;
case "showVirtualFile":
this.showVirtualFile(data.name, data.contents);
break;