summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/core/config.py12
-rw-r--r--continuedev/src/continuedev/core/policy.py6
-rw-r--r--extension/package-lock.json4
-rw-r--r--extension/package.json2
-rw-r--r--extension/react-app/src/components/ComboBox.tsx5
-rw-r--r--extension/src/diffs.ts8
6 files changed, 24 insertions, 13 deletions
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py
index 8f7e0b8c..ff7b8cb0 100644
--- a/continuedev/src/continuedev/core/config.py
+++ b/continuedev/src/continuedev/core/config.py
@@ -33,11 +33,11 @@ DEFAULT_SLASH_COMMANDS = [
description="Edit code in the current file or the highlighted code",
step_name="EditHighlightedCodeStep",
),
- SlashCommand(
- name="explain",
- description="Reply to instructions or a question with previous steps and the highlighted code or current file as context",
- step_name="SimpleChatStep",
- ),
+ # SlashCommand(
+ # name="explain",
+ # description="Reply to instructions or a question with previous steps and the highlighted code or current file as context",
+ # step_name="SimpleChatStep",
+ # ),
SlashCommand(
name="config",
description="Open the config file to create new and edit existing slash commands",
@@ -129,7 +129,7 @@ def load_global_config() -> ContinueConfig:
config_path = os.path.join(global_dir, 'config.json')
if not os.path.exists(config_path):
with open(config_path, 'w') as f:
- json.dump(dict(ContinueConfig()), f)
+ json.dump(ContinueConfig().dict(), f)
with open(config_path, 'r') as f:
try:
config_dict = json.load(f)
diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py
index ef753ee4..fc9266ab 100644
--- a/continuedev/src/continuedev/core/policy.py
+++ b/continuedev/src/continuedev/core/policy.py
@@ -74,14 +74,14 @@ class DemoPolicy(Policy):
# This could be defined with ObservationTypePolicy. Ergonomics not right though.
user_input = observation.user_input
- slash_command = parse_slash_command(user_input)
+ slash_command = parse_slash_command(user_input, config)
if slash_command is not None:
return slash_command
- custom_command = parse_custom_command(user_input)
+ custom_command = parse_custom_command(user_input, config)
if custom_command is not None:
return custom_command
- return ChatWithFunctions(user_input=user_input)
+ return SimpleChatStep(user_input=user_input)
return None
diff --git a/extension/package-lock.json b/extension/package-lock.json
index ce1a42ee..169b13b5 100644
--- a/extension/package-lock.json
+++ b/extension/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "continue",
- "version": "0.0.110",
+ "version": "0.0.111",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "continue",
- "version": "0.0.110",
+ "version": "0.0.111",
"license": "Apache-2.0",
"dependencies": {
"@electron/rebuild": "^3.2.10",
diff --git a/extension/package.json b/extension/package.json
index 607c2ca6..6a0f9eb3 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -14,7 +14,7 @@
"displayName": "Continue",
"pricing": "Free",
"description": "The open-source coding autopilot",
- "version": "0.0.110",
+ "version": "0.0.111",
"publisher": "Continue",
"engines": {
"vscode": "^1.67.0"
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index 73b7cc2d..545be32a 100644
--- a/extension/react-app/src/components/ComboBox.tsx
+++ b/extension/react-app/src/components/ComboBox.tsx
@@ -195,6 +195,11 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
) {
// Prevent Downshift's default 'Enter' behavior.
(event.nativeEvent as any).preventDownshiftDefault = true;
+
+ // cmd+enter to /edit
+ if (event.metaKey) {
+ event.currentTarget.value = `/edit ${event.currentTarget}`;
+ }
if (props.onEnter) props.onEnter(event);
setInputValue("");
const value = event.currentTarget.value;
diff --git a/extension/src/diffs.ts b/extension/src/diffs.ts
index 19ec80ab..b70c3b59 100644
--- a/extension/src/diffs.ts
+++ b/extension/src/diffs.ts
@@ -16,7 +16,7 @@ class DiffManager {
// Doing this because virtual files are read-only
private diffs: Map<string, DiffInfo> = new Map();
- constructor() {
+ private setupDirectory() {
// Make sure the diff directory exists
if (!fs.existsSync(DIFF_DIRECTORY)) {
fs.mkdirSync(DIFF_DIRECTORY, {
@@ -25,6 +25,10 @@ class DiffManager {
}
}
+ constructor() {
+ this.setupDirectory();
+ }
+
private escapeFilepath(filepath: string): string {
return filepath.replace(/\\/g, "_").replace(/\//g, "_");
}
@@ -47,6 +51,8 @@ class DiffManager {
}
writeDiff(originalFilepath: string, newContent: string): string {
+ this.setupDirectory();
+
// Create or update existing diff
const newFilepath = path.join(
DIFF_DIRECTORY,