Merge branch 'main' of github.com:continuedev/continue into jacob/con-2749
This commit is contained in:
commit
32aaf481a0
4 changed files with 17 additions and 20 deletions
|
|
@ -358,6 +358,9 @@ export default async function doLoadConfig(options: {
|
|||
};
|
||||
|
||||
if (newConfig.analytics) {
|
||||
// FIXME before re-enabling TeamAnalytics.setup() populate workspaceId in
|
||||
// controlPlaneProxyInfo to prevent /proxy/analytics/undefined/capture calls
|
||||
// where undefined is :workspaceId
|
||||
// await TeamAnalytics.setup(
|
||||
// newConfig.analytics,
|
||||
// uniqueId,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,12 @@ export default class ContinueProxyAnalyticsProvider
|
|||
event: string,
|
||||
properties: { [key: string]: any },
|
||||
): Promise<void> {
|
||||
if (!this.controlPlaneProxyInfo?.workspaceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = new URL(
|
||||
`proxy/analytics/${this.controlPlaneProxyInfo?.workspaceId}/capture`,
|
||||
`proxy/analytics/${this.controlPlaneProxyInfo.workspaceId}/capture`,
|
||||
this.controlPlaneProxyInfo?.controlPlaneProxyUrl,
|
||||
).toString();
|
||||
void fetch(url, {
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@ export interface SearchAndReplaceInFileArgs {
|
|||
export const NO_PARALLEL_TOOL_CALLING_INSRUCTION =
|
||||
"Note this tool CANNOT be called in parallel.";
|
||||
|
||||
const SEARCH_AND_REPLACE_TOOL_DESCRIPTION = `Request to replace sections of content in an existing file using multiple SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file. ${NO_PARALLEL_TOOL_CALLING_INSRUCTION}`;
|
||||
const SEARCH_AND_REPLACE_FILEPATH_DESCRIPTION =
|
||||
"The path of the file to modify, relative to the root of the workspace.";
|
||||
const SEARCH_AND_REPLACE_EXAMPLE_BLOCK = `------- SEARCH
|
||||
[exact content to find]
|
||||
=======
|
||||
|
|
@ -40,7 +37,8 @@ const SEARCH_AND_REPLACE_RULES = `Critical rules:
|
|||
* DO NOT make back-to-back tool calls. Instead interleave with brief explanation of what each will do. For example, instead of [explanation, tool call, tool call] you should do [explanation, tool call, explanation, tool call]
|
||||
6. Special operations:
|
||||
* To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location)
|
||||
* To delete code: Use empty REPLACE section`;
|
||||
* To delete code: Use empty REPLACE section
|
||||
7. You should always read the file before trying to edit it, to ensure you know the up-to-date file contents`;
|
||||
|
||||
const SEARCH_AND_REPLACE_DIFFS_DESCRIPTION = `An array of strings, each containing one or more SEARCH/REPLACE blocks following this exact format:
|
||||
\`\`\`
|
||||
|
|
@ -73,14 +71,14 @@ export const searchAndReplaceInFileTool: Tool = {
|
|||
isInstant: false,
|
||||
function: {
|
||||
name: BuiltInToolNames.SearchAndReplaceInFile,
|
||||
description: SEARCH_AND_REPLACE_TOOL_DESCRIPTION,
|
||||
description: `Request to replace sections of content in an existing file using multiple SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file. ${NO_PARALLEL_TOOL_CALLING_INSRUCTION}`,
|
||||
parameters: {
|
||||
type: "object",
|
||||
required: ["filepath", "diffs"],
|
||||
properties: {
|
||||
filepath: {
|
||||
type: "string",
|
||||
description: SEARCH_AND_REPLACE_FILEPATH_DESCRIPTION,
|
||||
description: `The path of the file to modify, relative to the root of the workspace.`,
|
||||
},
|
||||
diffs: {
|
||||
type: "array",
|
||||
|
|
@ -94,7 +92,7 @@ export const searchAndReplaceInFileTool: Tool = {
|
|||
},
|
||||
systemMessageDescription: createSystemMessageExampleCall(
|
||||
BuiltInToolNames.SearchAndReplaceInFile,
|
||||
`To make targeted edits by replacing sections of content in an existing file, use the ${BuiltInToolNames.SearchAndReplaceInFile} tool with a "diffs" argument containing an array of SEARCH/REPLACE blocks that define exact changes to specific parts of the file.
|
||||
`To make targeted edits by replacing sections of content in an existing file, use the ${BuiltInToolNames.SearchAndReplaceInFile} tool with a filepath (relative to the root of the workspace) and a "diffs" argument containing an array of SEARCH/REPLACE blocks that define exact changes to specific parts of the file.
|
||||
Each block should follow this format:
|
||||
${SEARCH_AND_REPLACE_EXAMPLE_BLOCK}
|
||||
|
||||
|
|
@ -106,16 +104,8 @@ ${SEARCH_AND_REPLACE_RULES}
|
|||
[
|
||||
"diffs",
|
||||
`[
|
||||
"------- SEARCH
|
||||
[exact content to find]
|
||||
=======
|
||||
[new content to replace with]
|
||||
+++++++ REPLACE",
|
||||
"------- SEARCH
|
||||
[exact content to find]
|
||||
=======
|
||||
[new content to replace with]
|
||||
+++++++ REPLACE"
|
||||
"${SEARCH_AND_REPLACE_EXAMPLE_BLOCK}",
|
||||
"${SEARCH_AND_REPLACE_EXAMPLE_BLOCK}"
|
||||
]`,
|
||||
],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -175,11 +175,11 @@ The `models` section defines the language models used in your configuration. Mod
|
|||
|
||||
- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. The default value is `[chat, edit, apply, summarize]`. Note that the `summarize` role is not currently used.
|
||||
|
||||
- `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on provider and model. Supported capabilities include:
|
||||
- `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on provider and model. See the [Model Capabilities guide](/customize/deep-dives/model-capabilities) for detailed information. Supported capabilities include:
|
||||
- `tool_use`: Enables function/tool calling support (required for Agent mode)
|
||||
- `image_input`: Enables image upload and processing support
|
||||
|
||||
Continue automatically detects these capabilities for most models, but you can override this when using custom deployments or if autodetection isn't working correctly. See the [Model Capabilities guide](/customize/deep-dives/model-capabilities) for detailed information.
|
||||
Continue automatically detects these capabilities for most models, but you can override this when using custom deployments or if autodetection isn't working correctly.
|
||||
|
||||
- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue