From 5d8f73bcd2973869045f5a9c29f20e142edb91cb Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 10 Jul 2024 12:08:03 -0500 Subject: [PATCH] chore: clearer naming for `useSuffix` (#1702) * chore: clearer naming for `useSuffix` * schema updates --- core/autocomplete/README.md | 2 +- core/config/types.ts | 2 +- core/index.d.ts | 2 +- core/util/parameters.ts | 2 +- docs/docs/walkthroughs/tab-autocomplete.md | 2 +- docs/static/schemas/config.json | 2 +- extensions/intellij/src/main/resources/config_schema.json | 2 +- extensions/vscode/config_schema.json | 2 +- extensions/vscode/continue_rc_schema.json | 2 +- extensions/vscode/package-lock.json | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/autocomplete/README.md b/core/autocomplete/README.md index c82509cbd..4e25c9fef 100644 --- a/core/autocomplete/README.md +++ b/core/autocomplete/README.md @@ -90,7 +90,7 @@ This is just another object like the ones in the `"models"` array of `config.jso This object allows you to customize the behavior of tab-autocomplete. The available options are: - `useCopyBuffer`: Determines whether the copy buffer will be considered when constructing the prompt. (Boolean) -- `useSuffix`: Determines whether to use the file suffix in the prompt. (Boolean) +- `useFileSuffix`: Determines whether to use the file suffix in the prompt. (Boolean) - `maxPromptTokens`: The maximum number of prompt tokens to use. A smaller number will yield faster completions, but less context. (Number) - `debounceDelay`: The delay in milliseconds before triggering autocomplete after a keystroke. (Number) - `maxSuffixPercentage`: The maximum percentage of the prompt that can be dedicated to the suffix. (Number) diff --git a/core/config/types.ts b/core/config/types.ts index 30fe8a4c7..00af67836 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -676,7 +676,7 @@ declare global { export interface TabAutocompleteOptions { disable: boolean; useCopyBuffer: boolean; - useSuffix: boolean; + useFileSuffix: boolean; maxPromptTokens: number; debounceDelay: number; maxSuffixPercentage: number; diff --git a/core/index.d.ts b/core/index.d.ts index e6b4e307a..816453c45 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -769,7 +769,7 @@ export interface Reranker { export interface TabAutocompleteOptions { disable: boolean; useCopyBuffer: boolean; - useSuffix: boolean; + useFileSuffix: boolean; maxPromptTokens: number; debounceDelay: number; maxSuffixPercentage: number; diff --git a/core/util/parameters.ts b/core/util/parameters.ts index 13b38626d..b413a869e 100644 --- a/core/util/parameters.ts +++ b/core/util/parameters.ts @@ -3,7 +3,7 @@ import { TabAutocompleteOptions } from "../index.js"; export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { disable: false, useCopyBuffer: false, - useSuffix: true, + useFileSuffix: true, maxPromptTokens: 1024, prefixPercentage: 0.85, maxSuffixPercentage: 0.25, diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index 90976b16e..1aef6cb6b 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -94,7 +94,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa - `disable`: Disable autocomplete (can also be done from IDE settings) - `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String) - `useCopyBuffer`: Determines whether the copy buffer will be considered when constructing the prompt. (Boolean) -- `useSuffix`: Determines whether to use the file suffix in the prompt. (Boolean) +- `useFileSuffix`: Determines whether to use the file suffix in the prompt. (Boolean) - `maxPromptTokens`: The maximum number of prompt tokens to use. A smaller number will yield faster completions, but less context. (Number) - `prefixPercentage`: The percentage of the input that should be dedicated to the prefix. (Number) - `maxSuffixPercentage`: The maximum percentage of the prompt that can be dedicated to the suffix. (Number) diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 657d48c16..6d16f6b91 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -2071,7 +2071,7 @@ "type": "boolean", "description": "Determines whether the copy buffer will be considered when contructing the prompt." }, - "useSuffix": { + "useFileSuffix": { "type": "boolean", "description": "Determines whether to use the file suffix in the prompt." }, diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 657d48c16..6d16f6b91 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -2071,7 +2071,7 @@ "type": "boolean", "description": "Determines whether the copy buffer will be considered when contructing the prompt." }, - "useSuffix": { + "useFileSuffix": { "type": "boolean", "description": "Determines whether to use the file suffix in the prompt." }, diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 657d48c16..6d16f6b91 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -2071,7 +2071,7 @@ "type": "boolean", "description": "Determines whether the copy buffer will be considered when contructing the prompt." }, - "useSuffix": { + "useFileSuffix": { "type": "boolean", "description": "Determines whether to use the file suffix in the prompt." }, diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 37d8bfe1b..2ce8beeaa 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -2326,7 +2326,7 @@ "type": "boolean", "description": "Determines whether the copy buffer will be considered when contructing the prompt." }, - "useSuffix": { + "useFileSuffix": { "type": "boolean", "description": "Determines whether to use the file suffix in the prompt." }, diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 5292c11fa..692420678 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,11 +1,11 @@ { - "name": "continue", + "name": "testname", "version": "0.9.181", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "continue", + "name": "testname", "version": "0.9.181", "license": "Apache-2.0", "dependencies": {