From d05a9815233e26dc3aac35e3491c0f6bbe725022 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Jun 2023 14:34:42 -0700 Subject: feedback with unique id, patch --- extension/package-lock.json | 4 +- extension/package.json | 2 +- extension/react-app/src/tabs/gui.tsx | 194 +++++++++++---------- .../scripts/continuedev-0.1.1-py3-none-any.whl | Bin 0 -> 81413 bytes extension/src/continueIdeClient.ts | 9 + 5 files changed, 113 insertions(+), 96 deletions(-) create mode 100644 extension/scripts/continuedev-0.1.1-py3-none-any.whl (limited to 'extension') diff --git a/extension/package-lock.json b/extension/package-lock.json index 6edc38f9..afa8ab2d 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.36", + "version": "0.0.38", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.36", + "version": "0.0.38", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index 91d687ab..4b86f4ea 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "Refine code 10x faster", - "version": "0.0.36", + "version": "0.0.38", "publisher": "Continue", "engines": { "vscode": "^1.74.0" diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index 55c2b763..70bab352 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -21,6 +21,11 @@ import { import ComboBox from "../components/ComboBox"; import TextDialog from "../components/TextDialog"; +const MainDiv = styled.div` + display: grid; + grid-template-rows: 1fr auto; +`; + let TopGUIDiv = styled.div` display: grid; grid-template-columns: 1fr; @@ -39,10 +44,11 @@ const TopBar = styled.div` display: flex; flex-direction: row; gap: 8px; - justify-content: center; + justify-content: right; padding: 8px; align-items: center; - border-bottom: 0.1px solid gray; + margin-top: 8px; + border-top: 0.1px solid gray; `; interface GUIProps { @@ -294,101 +300,103 @@ function GUI(props: GUIProps) { setShowFeedbackDialog(false); }} > - { - if (e.key === "Enter" && e.ctrlKey) { - onMainTextInput(); - } - }} - > - - - - Continue Docs - - - - { - // Set dialog open - setShowFeedbackDialog(true); - }} - > - Feedback - - - { - client?.sendClear(); + + { + if (e.key === "Enter" && e.ctrlKey) { + onMainTextInput(); + } + }} + > + {typeof client === "undefined" && ( + <> + +

+ Trying to reconnect with server... +

+ + )} + {history?.timeline.map((node: HistoryNode, index: number) => { + return ( + { + onStepUserInput(input, index); + }} + inFuture={index > history?.current_index} + historyNode={node} + onRefinement={(input: string) => { + client?.sendRefinementInput(input, index); + }} + onReverse={() => { + client?.reverseToIndex(index); + }} + onRetry={() => { + client?.retryAtIndex(index); + setWaitingForSteps(true); + }} + onDelete={() => { + client?.deleteAtIndex(index); + }} + /> + ); + })} + {waitingForSteps && } + +
+ {userInputQueue.map((input) => { + return {input}; + })} +
+ + { + onMainTextInput(); + e.stopPropagation(); + e.preventDefault(); }} - style={{ padding: "3px" }} - > - Clear History - -
-
+ onInputValueChange={() => {}} + items={availableSlashCommands} + /> + - {typeof client === "undefined" && ( - <> - -

- Trying to reconnect with server... -

- - )} - {history?.timeline.map((node: HistoryNode, index: number) => { - return ( - { - onStepUserInput(input, index); + + + + Continue Docs + + + + { + // Set dialog open + setShowFeedbackDialog(true); }} - inFuture={index > history?.current_index} - historyNode={node} - onRefinement={(input: string) => { - client?.sendRefinementInput(input, index); - }} - onReverse={() => { - client?.reverseToIndex(index); - }} - onRetry={() => { - client?.retryAtIndex(index); - setWaitingForSteps(true); - }} - onDelete={() => { - client?.deleteAtIndex(index); + > + Feedback + + + { + client?.sendClear(); }} - /> - ); - })} - {waitingForSteps && } - -
- {userInputQueue.map((input) => { - return {input}; - })} -
- - { - onMainTextInput(); - e.stopPropagation(); - e.preventDefault(); - }} - onInputValueChange={() => {}} - items={availableSlashCommands} - /> - -
+ style={{ padding: "3px" }} + > + Clear History + + + + + ); } diff --git a/extension/scripts/continuedev-0.1.1-py3-none-any.whl b/extension/scripts/continuedev-0.1.1-py3-none-any.whl new file mode 100644 index 00000000..b3e8229a Binary files /dev/null and b/extension/scripts/continuedev-0.1.1-py3-none-any.whl differ diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 3308068a..16941c70 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -77,6 +77,11 @@ class IdeProtocolClient { workspaceDirectory: this.getWorkspaceDirectory(), }); break; + case "uniqueId": + this.messenger?.send("uniqueId", { + uniqueId: this.getUniqueId(), + }); + break; case "getUserSecret": this.messenger?.send("getUserSecret", { value: await this.getUserSecret(data.key), @@ -128,6 +133,10 @@ class IdeProtocolClient { return vscode.workspace.workspaceFolders[0].uri.fsPath; } + getUniqueId() { + return vscode.env.machineId; + } + // ------------------------------------ // // On message handlers -- cgit v1.2.3-70-g09d2