From 698dccf474619963de0312d36af6d01e3df8b47a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 8 Aug 2023 14:10:22 -0700 Subject: feat: :children_crossing: display troubleshooting link when loading --- .../src/continuedev/libs/llm/hf_inference_api.py | 2 +- extension/react-app/src/pages/gui.tsx | 66 +++++++++++++++++----- extension/src/debugPanel.ts | 4 ++ 3 files changed, 56 insertions(+), 16 deletions(-) diff --git a/continuedev/src/continuedev/libs/llm/hf_inference_api.py b/continuedev/src/continuedev/libs/llm/hf_inference_api.py index 9664fec2..8945250c 100644 --- a/continuedev/src/continuedev/libs/llm/hf_inference_api.py +++ b/continuedev/src/continuedev/libs/llm/hf_inference_api.py @@ -52,7 +52,7 @@ class HuggingFaceInferenceAPI(LLM): response = requests.post(API_URL, headers=headers, json={ "inputs": prompt, "parameters": { - "max_new_tokens": self.max_context_length - self.count_tokens(prompt), + "max_new_tokens": min(250, self.max_context_length - self.count_tokens(prompt)), "max_time": DEFAULT_MAX_TIME, "return_full_text": False, } diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx index ff113636..4c89bbaa 100644 --- a/extension/react-app/src/pages/gui.tsx +++ b/extension/react-app/src/pages/gui.tsx @@ -351,21 +351,57 @@ function GUI(props: GUIProps) { > Continue Server Starting

-

{ - postVscMessage("toggleDevTools", {}); - }} - > - Click to view logs -

+
+

+ + + Troubleshooting help + + +

+

{ + postVscMessage("toggleDevTools", {}); + }} + > + View logs +

+

{ + postVscMessage("reloadWindow", {}); + }} + > + Reload the window +

+
Tip: Drag the Continue logo from the far left of the window to the right, then toggle Continue using option/alt+command+m. diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts index d133080b..e6dade37 100644 --- a/extension/src/debugPanel.ts +++ b/extension/src/debugPanel.ts @@ -252,6 +252,10 @@ export function setupDebugPanel( vscode.commands.executeCommand("continue.viewLogs"); break; } + case "reloadWindow": { + vscode.commands.executeCommand("workbench.action.reloadWindow"); + break; + } case "focusEditor": { setFocusedOnContinueInput(false); vscode.commands.executeCommand( -- cgit v1.2.3-70-g09d2