core util test prompt file

This commit is contained in:
Dallin Romney 2024-12-03 17:32:10 -08:00
parent efd93761d2
commit a124eb3d04
6 changed files with 25 additions and 7 deletions

View file

@ -0,0 +1,21 @@
name: Create Core Test
description: Generate unit tests for core utilities
---
Write jest tests for the provided code. Use best practices. Be clear and consise.
Aim for 100% code coverage where reasonable.
Multiple tests can be written, split up tests for best clarity and readability.
Only use typescript, and if the file/code is not typescript, warn the user.
Use given types to generate mock data if needed.
Additional types can be imported from @core/gui/src/components/mainInput/types.d.ts
If any needed type declaration is still not found, warn the user.
Existing test fixtures can be found in:
@core/test/util/fixtures.ts
- import and use `testIde` for any IDE type needs
- import and use `testControlPlaneClient` for any ControlPlaneClient needs
- import and use `testConfigHandler` for any ConfigHandler needs
- import and use `ideSettingsPromise` for any IdeSettings needs
// This note is for if using edit mode to encourage it to create new files
The tests are to be put in a new file with the same filepath but with a .test.ts extension rather than a .ts extension

3
.gitignore vendored
View file

@ -135,9 +135,7 @@ cached_embeddings.pkl
.ruff_cache
codeql
**/.continue
.DS_Store
.continue
.test
.tiktoken_cache
@ -153,7 +151,6 @@ continue_server.dist
Icon
Icon?
.continue
.continuerc.json
.prompts/
.aider*

View file

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Prompt Logs" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="mkdir -p ./binary/.continue/logs &amp;&amp; touch ./binary/.continue/logs/prompt.log &amp;&amp; tail -f ./binary/.continue/logs/prompt.log" />
<option name="SCRIPT_TEXT" value="mkdir -p ./extensions/.continue-debug/logs &amp;&amp; touch ./extensions/.continue-debug/logs/prompt.log &amp;&amp; tail -f ./extensions/.continue-debug/logs/prompt.log" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />

View file

@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Start Core Dev Server (CE)" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="export CONTINUE_DEVELOPMENT=true &amp;&amp; export CONTINUE_GLOBAL_DIR=$PROJECT_DIR$/binary/.continue &amp;&amp; node out/index.js" />
<option name="SCRIPT_TEXT" value="export CONTINUE_DEVELOPMENT=true &amp;&amp; export CONTINUE_GLOBAL_DIR=$PROJECT_DIR$/extensions/.continue-debug &amp;&amp; node out/index.js" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />

View file

@ -2,7 +2,7 @@
<configuration default="false" name="Start Core Dev Server" type="NodeJSConfigurationType" path-to-js-file="out/index.js" working-dir="$PROJECT_DIR$/binary">
<envs>
<env name="CONTINUE_DEVELOPMENT" value="true" />
<env name="CONTINUE_GLOBAL_DIR" value="$PROJECT_DIR$/binary/.continue" />
<env name="CONTINUE_GLOBAL_DIR" value="$PROJECT_DIR$/extensions/.continue-debug" />
</envs>
<method v="2" />
</configuration>

View file

@ -71,7 +71,7 @@ This should open a new instance on IntelliJ with the extension installed.
### Accessing files in the `.continue` directory
When running the `Start Core Dev Server` task, we set the location of your Continue directory to `./binary/.continue`. This is to
When running the `Start Core Dev Server` task, we set the location of your Continue directory to `./extensions/.continue-debug`. This is to
allow for changes to your `config.json` and other files during development, without affecting your actual configuration.
### Reloading changes