From 6e71dd219511a65993edd6718dbd03412abc4d97 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 8 Dec 2023 13:27:12 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20small=20bug=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/how-to-use-continue.md | 6 +++--- gui/src/redux/selectors/configSelectors.ts | 1 + server/continuedev/plugins/context_providers/diff.py | 4 ++-- server/install-dependencies.sh | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/docs/how-to-use-continue.md b/docs/docs/how-to-use-continue.md index 0d2a90373..5bd4fcb98 100644 --- a/docs/docs/how-to-use-continue.md +++ b/docs/docs/how-to-use-continue.md @@ -20,9 +20,9 @@ If you are trying to use it for a new task and don’t have a sense of how much 1. Highlight the code section(s) that you don’t understand and type "tell me how this code works" in the input box 2. If the explanation seems reasonable, then, while still highlighting the code section(s), type "how would you change this code to [INSERT TASK]?" -3. If this explanation is also pretty good, then, while still highlighting the code section(s), type `/edit [INSERT TASK]` -4. If it does not work on first attempt, click `reject` on its suggestions and try again—often it will make a different suggestion each time -5. If it is not giving you what you want after another attempt, click `reject` and try again with more specific / clear instructions, articulating exactly what you want it to do and not to do +3. If this explanation is also pretty good, then, while still highlighting the code section(s), type `/edit [INSERT TASK]`. If you like the suggested diff, use `cmd+shift+enter` to accept the changes. +4. If it does not work on first attempt, use `cmd+shift+backspace` to reject the changes and try again—often it will make a different suggestion each time +5. If it is not giving you what you want after another attempt, reject and try again with more specific / clear instructions, articulating exactly what you want it to do and not to do 6. If this still does not work, then you likely need to break down the task into smaller sub-tasks and ask the LLM to do each of those one at a time or just do it yourself manually Remember: You are responsible for all code that you ship, whether it was written by you or by an LLM that you directed. This means it is crucial that you review what the LLM writes. To make this easier, we provide natural language descriptions of the actions the LLM took in the Continue GUI. diff --git a/gui/src/redux/selectors/configSelectors.ts b/gui/src/redux/selectors/configSelectors.ts index 8d1cbf1db..b2e2dd45a 100644 --- a/gui/src/redux/selectors/configSelectors.ts +++ b/gui/src/redux/selectors/configSelectors.ts @@ -8,6 +8,7 @@ export const contextLengthSelector = (state: RootStore) => { "gpt-3.5-turbo-16k": 16384, "gpt-4-32k": 32768, "claude-2": 16384, + "gpt-4-1106-preview": 128_000, }[state.serverState.config.model_roles?.default] || 4096 ); }; diff --git a/server/continuedev/plugins/context_providers/diff.py b/server/continuedev/plugins/context_providers/diff.py index 05da3547f..d67f84176 100644 --- a/server/continuedev/plugins/context_providers/diff.py +++ b/server/continuedev/plugins/context_providers/diff.py @@ -54,7 +54,7 @@ class DiffContextProvider(ContextProvider): ) diff = result.stdout error = result.stderr - if error.strip() != "": + if error is not None and error.strip() != "": if error.startswith("warning: Not a git repository"): raise ContinueCustomException( title="Not a git repository", @@ -65,7 +65,7 @@ class DiffContextProvider(ContextProvider): message=f"Error running git diff:\n\n{error}", ) - if diff.strip() == "": + if diff is None or diff.strip() == "": diff = "No changes" ctx_item = self.BASE_CONTEXT_ITEM.copy() diff --git a/server/install-dependencies.sh b/server/install-dependencies.sh index 8f1b5d27c..583ff6f88 100755 --- a/server/install-dependencies.sh +++ b/server/install-dependencies.sh @@ -14,3 +14,6 @@ poetry install echo "Running type generation..." poetry run typegen + +echo "Building Rust extension..." +poetry run maturin develop \ No newline at end of file