Merge branch 'main' into nate/rerendering-deep-dive
This commit is contained in:
commit
cb467fa2be
18 changed files with 20591 additions and 2427 deletions
|
|
@ -4,7 +4,6 @@ import * as toolDefinitions from "./definitions";
|
|||
// I'm writing these as functions because we've messed up 3 TIMES by pushing to const, causing duplicate tool definitions on subsequent config loads.
|
||||
export const getBaseToolDefinitions = () => [
|
||||
toolDefinitions.readFileTool,
|
||||
|
||||
toolDefinitions.createNewFileTool,
|
||||
toolDefinitions.runTerminalCommandTool,
|
||||
toolDefinitions.globSearchTool,
|
||||
|
|
@ -13,7 +12,6 @@ export const getBaseToolDefinitions = () => [
|
|||
toolDefinitions.lsTool,
|
||||
toolDefinitions.createRuleBlock,
|
||||
toolDefinitions.fetchUrlContentTool,
|
||||
toolDefinitions.singleFindAndReplaceTool,
|
||||
];
|
||||
|
||||
export const getConfigDependentToolDefinitions = (
|
||||
|
|
@ -42,6 +40,7 @@ export const getConfigDependentToolDefinitions = (
|
|||
tools.push(toolDefinitions.multiEditTool);
|
||||
} else {
|
||||
tools.push(toolDefinitions.editFileTool);
|
||||
tools.push(toolDefinitions.singleFindAndReplaceTool);
|
||||
}
|
||||
|
||||
// missing support for remote os calls: https://github.com/microsoft/vscode/issues/252269
|
||||
|
|
|
|||
|
|
@ -190,9 +190,12 @@ models:
|
|||
|
||||
#### If Agent Mode Shows "Not Supported"
|
||||
|
||||

|
||||
|
||||
1. First, add `capabilities: [tool_use]` to your model config
|
||||
2. If you still get errors, the model may not actually support tools despite documentation
|
||||
3. Use a different model known to work with tools (e.g., Llama 3.1, Mistral)
|
||||
4. Alternatively, you can turn on [System Message tools](/features/agent/model-setup#how-system-message-tools-work)
|
||||
|
||||
See the [Model Capabilities guide](/customize/deep-dives/model-capabilities) for more details.
|
||||
|
||||
|
|
|
|||
BIN
docs/images/guides/images/agent-not-supported.png
Normal file
BIN
docs/images/guides/images/agent-not-supported.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
|
|
@ -107,6 +107,11 @@ process.on("uncaughtException", (error) => {
|
|||
// Don't exit the process, just log the error
|
||||
});
|
||||
|
||||
// keyboard interruption handler for non-TUI flows
|
||||
process.on("SIGINT", async () => {
|
||||
await gracefulExit(130);
|
||||
});
|
||||
|
||||
const program = new Command();
|
||||
|
||||
program
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import {
|
|||
serviceContainer,
|
||||
} from "../services/index.js";
|
||||
import type { ToolPermissionServiceState } from "../services/ToolPermissionService.js";
|
||||
import type { ModelServiceState } from "../services/types.js";
|
||||
import { telemetryService } from "../telemetry/telemetryService.js";
|
||||
import { logger } from "../util/logger.js";
|
||||
import { isModelCapable } from "../utils/index.js";
|
||||
|
||||
import { editTool } from "./edit.js";
|
||||
import { exitTool } from "./exit.js";
|
||||
|
|
@ -66,9 +68,53 @@ function getDynamicTools(): Tool[] {
|
|||
return dynamicTools;
|
||||
}
|
||||
|
||||
// Get all builtin tools including dynamic ones
|
||||
// Check if the current model is capable and should exclude Edit tool
|
||||
function shouldExcludeEditTool(): boolean {
|
||||
try {
|
||||
const modelServiceResult = getServiceSync<ModelServiceState>(
|
||||
SERVICE_NAMES.MODEL,
|
||||
);
|
||||
|
||||
if (
|
||||
modelServiceResult.state === "ready" &&
|
||||
modelServiceResult.value?.model
|
||||
) {
|
||||
const { name, provider, model } = modelServiceResult.value.model;
|
||||
|
||||
// Check if model is capable
|
||||
const isCapable = isModelCapable(provider, name, model);
|
||||
|
||||
logger.debug("Capability-based tool filtering", {
|
||||
provider,
|
||||
name,
|
||||
isCapable,
|
||||
willExcludeEdit: isCapable,
|
||||
});
|
||||
|
||||
return isCapable;
|
||||
}
|
||||
} catch (error) {
|
||||
logger.debug("Error checking model capability for tool filtering", {
|
||||
error,
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get all builtin tools including dynamic ones, with capability-based filtering
|
||||
export function getAllBuiltinTools(): Tool[] {
|
||||
return [...BUILTIN_TOOLS, ...getDynamicTools()];
|
||||
let builtinTools = [...BUILTIN_TOOLS];
|
||||
|
||||
// Apply capability-based filtering for edit tools
|
||||
// If model is capable, exclude editTool in favor of multiEditTool
|
||||
if (shouldExcludeEditTool()) {
|
||||
builtinTools = builtinTools.filter((tool) => tool.name !== editTool.name);
|
||||
logger.debug(
|
||||
"Excluded Edit tool for capable model - MultiEdit will be used instead",
|
||||
);
|
||||
}
|
||||
|
||||
return [...builtinTools, ...getDynamicTools()];
|
||||
}
|
||||
|
||||
export function getToolDisplayName(toolName: string): string {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import {
|
|||
getLanguageFromFilePath,
|
||||
} from "../telemetry/utils.js";
|
||||
|
||||
import { editTool } from "./edit.js";
|
||||
import { readFilesSet, readFileTool } from "./readFile.js";
|
||||
import { Tool } from "./types.js";
|
||||
import { generateDiff } from "./writeFile.js";
|
||||
|
|
@ -133,8 +132,8 @@ export const multiEditTool: Tool = {
|
|||
displayName: "MultiEdit",
|
||||
readonly: false,
|
||||
isBuiltIn: true,
|
||||
description: `This is a tool for making multiple edits to a single file in one operation. It is built on top of the ${editTool.name} tool and allows you to perform multiple find-and-replace operations efficiently.
|
||||
Prefer this tool over the ${editTool.name} tool when you need to make multiple edits to the same file.
|
||||
description: `This is a tool for making multiple edits to a single file in one operation. It allows you to perform multiple find-and-replace operations efficiently.
|
||||
This tool is ideal when you need to make multiple edits to the same file.
|
||||
|
||||
To make multiple edits to a file, provide the following:
|
||||
1. file_path: The absolute path to the file to modify (must be absolute, not relative)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
pluginGroup=com.github.continuedev.continueintellijextension
|
||||
pluginVersion=1.0.43
|
||||
pluginVersion=1.0.44
|
||||
platformVersion=2024.1
|
||||
kotlin.stdlib.default.dependency=false
|
||||
org.gradle.configuration-cache=true
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "1.3.8",
|
||||
"version": "1.3.9",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
6
packages/config-yaml/package-lock.json
generated
6
packages/config-yaml/package-lock.json
generated
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.96",
|
||||
"version": "1.14.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.96",
|
||||
"version": "1.14.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "file:../config-types",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.96",
|
||||
"version": "1.14.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
"author": "Continue Dev, Inc.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "file:../config-types",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
|
|
|
|||
7668
packages/fetch/package-lock.json
generated
7668
packages/fetch/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/fetch",
|
||||
"version": "1.0.16",
|
||||
"version": "1.1.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
"author": "Nate Sesti and Ty Dunn",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "file:../config-types",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"follow-redirects": "^1.15.6",
|
||||
"http-proxy-agent": "^7.0.2",
|
||||
"https-proxy-agent": "^7.0.5",
|
||||
|
|
@ -21,6 +21,11 @@
|
|||
"devDependencies": {
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"typescript": "^5.0.0",
|
||||
"vitest": "^3.2.0"
|
||||
"vitest": "^3.2.0",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/github": "^9.2.6",
|
||||
"@semantic-release/npm": "^10.0.6",
|
||||
"semantic-release": "^21.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
16
packages/hub/package-lock.json
generated
16
packages/hub/package-lock.json
generated
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"name": "@continuedev/hub",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@continuedev/hub",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.7",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.70"
|
||||
"@continuedev/config-yaml": "^1.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
|
|
@ -544,13 +544,17 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.70",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.70.tgz",
|
||||
"integrity": "sha512-0hwc2a2NyUDDNDAx23SOFfY4sV8EafuCow4JNpRzCz8swH3ZfO+vdOzKMIEzAzcYXcpjldsOAZsYE4iypu1L+Q==",
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.14.0.tgz",
|
||||
"integrity": "sha512-MRi2SKTLkXme/lyFZruXGhWsaH9eMHvgkj/gAQcAhe6LxvbEOt2SyG7IS/t/8fDRJ2pXIjK/FtJpdKarXokJpA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"bin": {
|
||||
"config-yaml": "dist/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/hub",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.7",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
"author": "Continue Dev, Inc.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.70"
|
||||
"@continuedev/config-yaml": "^1.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
|
|
|
|||
7732
packages/llm-info/package-lock.json
generated
7732
packages/llm-info/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -13,6 +13,11 @@
|
|||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.15.29",
|
||||
"typescript": "^5.5.2"
|
||||
"typescript": "^5.5.2",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/github": "^9.2.6",
|
||||
"@semantic-release/npm": "^10.0.6",
|
||||
"semantic-release": "^21.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7494
packages/openai-adapters/package-lock.json
generated
7494
packages/openai-adapters/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/openai-adapters",
|
||||
"version": "1.5.1",
|
||||
"version": "1.14.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
|
||||
"@aws-sdk/credential-providers": "^3.840.0",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"@continuedev/config-yaml": "^1.8.0",
|
||||
"@continuedev/fetch": "^1.0.16",
|
||||
"@continuedev/config-yaml": "^1.14.0",
|
||||
"@continuedev/fetch": "^1.1.0",
|
||||
"dotenv": "^16.5.0",
|
||||
"google-auth-library": "^10.1.0",
|
||||
"json-schema": "^0.4.0",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue