summaryrefslogtreecommitdiff
path: root/continuedev
diff options
context:
space:
mode:
Diffstat (limited to 'continuedev')
-rw-r--r--continuedev/README.md37
-rw-r--r--continuedev/src/continuedev/libs/util/count_tokens.py2
-rw-r--r--continuedev/src/continuedev/steps/core/core.py2
3 files changed, 39 insertions, 2 deletions
diff --git a/continuedev/README.md b/continuedev/README.md
index 911d467d..528cf75a 100644
--- a/continuedev/README.md
+++ b/continuedev/README.md
@@ -24,3 +24,40 @@ Start it by running the following commands:
## Writing Steps
See the `src/continuedev/libs/steps` folder for examples of writing a Continue step. See our documentation for tutorials.
+
+## How to contribute
+
+Open a [new GitHub Issue](https://github.com/continuedev/continue/issues/new) or comment on [an existing one](https://github.com/continuedev/continue/issues). Let us know what you would like to contribute, and we will help you make it happen!
+
+## Install from source
+
+#### 1. Clone this repo
+
+Recommended: Run this command to use SSH
+
+```bash
+git clone git@github.com:continuedev/continue.git
+```
+
+Alternative: Run this command to use HTTPS
+
+```bash
+git clone https://github.com/continuedev/continue
+```
+
+#### 2. Install Continue
+
+Run this command to use the install script
+
+```bash
+cd continue/extension/scripts && python3 install_from_source.py
+```
+
+# Understanding the codebase
+
+- [Continue Server README](./continuedev/README.md): learn about the core of Continue, which can be downloaded as a [PyPI package](https://pypi.org/project/continuedev/)
+- [VS Code Extension README](./extension/README.md): learn about the capabilities of our extension—the first implementation of Continue's IDE Protocol—which makes it possible to use use Continue in VS Code and GitHub Codespaces
+- [Continue GUI README](./extension/react-app/): learn about the React app that lets users interact with the server and is placed adjacent to the text editor in any suppported IDE
+- [Schema README](./schema): learn about the JSON Schema types generated from Pydantic models, which we use across the `continuedev/` and `extension/` directories
+- [Continue Docs README](./docs): learn how our [docs](https://continue.dev/docs) are written and built
+- [How to debug the VS Code Extension README](./extension/src/README.md): learn how to set up the VS Code extension, so you can debug it \ No newline at end of file
diff --git a/continuedev/src/continuedev/libs/util/count_tokens.py b/continuedev/src/continuedev/libs/util/count_tokens.py
index 047a47e4..8b06fef9 100644
--- a/continuedev/src/continuedev/libs/util/count_tokens.py
+++ b/continuedev/src/continuedev/libs/util/count_tokens.py
@@ -83,7 +83,7 @@ def compile_chat_messages(model: str, msgs: List[ChatMessage], prompt: Union[str
prompt_tokens += count_tokens(model, json.dumps(function))
msgs = prune_chat_history(model,
- msgs, MAX_TOKENS_FOR_MODEL[model], prompt_tokens + 1000 + count_tokens(model, system_message))
+ msgs, MAX_TOKENS_FOR_MODEL[model], prompt_tokens + DEFAULT_MAX_TOKENS + count_tokens(model, system_message))
history = []
if system_message:
history.append({
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py
index 1cbf3816..c8acd7c5 100644
--- a/continuedev/src/continuedev/steps/core/core.py
+++ b/continuedev/src/continuedev/steps/core/core.py
@@ -166,7 +166,7 @@ class DefaultModelEditCodeStep(Step):
# Overflow won't happen, but prune_chat_messages in count_tokens.py will cut out this whole thing, instead of us cutting out only as many lines as we need.
model_to_use = sdk.models.default
- BUFFER_FOR_FUNCTIONS = 200
+ BUFFER_FOR_FUNCTIONS = 400
total_tokens = model_to_use.count_tokens(
full_file_contents + self._prompt + self.user_input) + BUFFER_FOR_FUNCTIONS + DEFAULT_MAX_TOKENS