mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
chore: rm broken codesearch tool (#24992)
This commit is contained in:
@@ -721,8 +721,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "جلب محتوى من عنوان URL",
|
||||
"settings.permissions.tool.websearch.title": "بحث الويب",
|
||||
"settings.permissions.tool.websearch.description": "البحث في الويب",
|
||||
"settings.permissions.tool.codesearch.title": "بحث الكود",
|
||||
"settings.permissions.tool.codesearch.description": "البحث عن كود على الويب",
|
||||
"settings.permissions.tool.external_directory.title": "دليل خارجي",
|
||||
"settings.permissions.tool.external_directory.description": "الوصول إلى الملفات خارج دليل المشروع",
|
||||
"settings.permissions.tool.doom_loop.title": "حلقة الموت",
|
||||
|
||||
@@ -732,8 +732,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Buscar conteúdo de uma URL",
|
||||
"settings.permissions.tool.websearch.title": "Pesquisa Web",
|
||||
"settings.permissions.tool.websearch.description": "Pesquisar na web",
|
||||
"settings.permissions.tool.codesearch.title": "Pesquisa de Código",
|
||||
"settings.permissions.tool.codesearch.description": "Pesquisar código na web",
|
||||
"settings.permissions.tool.external_directory.title": "Diretório Externo",
|
||||
"settings.permissions.tool.external_directory.description": "Acessar arquivos fora do diretório do projeto",
|
||||
"settings.permissions.tool.doom_loop.title": "Loop Infinito",
|
||||
|
||||
@@ -806,8 +806,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Preuzmi sadržaj sa URL-a",
|
||||
"settings.permissions.tool.websearch.title": "Web pretraga",
|
||||
"settings.permissions.tool.websearch.description": "Pretražuj web",
|
||||
"settings.permissions.tool.codesearch.title": "Pretraga koda",
|
||||
"settings.permissions.tool.codesearch.description": "Pretraži kod na webu",
|
||||
"settings.permissions.tool.external_directory.title": "Vanjski direktorij",
|
||||
"settings.permissions.tool.external_directory.description": "Pristup datotekama izvan direktorija projekta",
|
||||
"settings.permissions.tool.doom_loop.title": "Beskonačna petlja",
|
||||
|
||||
@@ -800,8 +800,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Hent indhold fra en URL",
|
||||
"settings.permissions.tool.websearch.title": "Websøgning",
|
||||
"settings.permissions.tool.websearch.description": "Søg på nettet",
|
||||
"settings.permissions.tool.codesearch.title": "Kodesøgning",
|
||||
"settings.permissions.tool.codesearch.description": "Søg kode på nettet",
|
||||
"settings.permissions.tool.external_directory.title": "Ekstern mappe",
|
||||
"settings.permissions.tool.external_directory.description": "Få adgang til filer uden for projektmappen",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -743,8 +743,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Inhalt von einer URL abrufen",
|
||||
"settings.permissions.tool.websearch.title": "Web-Suche",
|
||||
"settings.permissions.tool.websearch.description": "Das Web durchsuchen",
|
||||
"settings.permissions.tool.codesearch.title": "Code-Suche",
|
||||
"settings.permissions.tool.codesearch.description": "Code im Web durchsuchen",
|
||||
"settings.permissions.tool.external_directory.title": "Externes Verzeichnis",
|
||||
"settings.permissions.tool.external_directory.description": "Zugriff auf Dateien außerhalb des Projektverzeichnisses",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -920,8 +920,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Fetch content from a URL",
|
||||
"settings.permissions.tool.websearch.title": "Web Search",
|
||||
"settings.permissions.tool.websearch.description": "Search the web",
|
||||
"settings.permissions.tool.codesearch.title": "Code Search",
|
||||
"settings.permissions.tool.codesearch.description": "Search code on the web",
|
||||
"settings.permissions.tool.external_directory.title": "External Directory",
|
||||
"settings.permissions.tool.external_directory.description": "Access files outside the project directory",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -813,8 +813,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Obtener contenido de una URL",
|
||||
"settings.permissions.tool.websearch.title": "Búsqueda Web",
|
||||
"settings.permissions.tool.websearch.description": "Buscar en la web",
|
||||
"settings.permissions.tool.codesearch.title": "Búsqueda de Código",
|
||||
"settings.permissions.tool.codesearch.description": "Buscar código en la web",
|
||||
"settings.permissions.tool.external_directory.title": "Directorio Externo",
|
||||
"settings.permissions.tool.external_directory.description": "Acceder a archivos fuera del directorio del proyecto",
|
||||
"settings.permissions.tool.doom_loop.title": "Bucle Infinito",
|
||||
|
||||
@@ -741,8 +741,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Récupérer le contenu d'une URL",
|
||||
"settings.permissions.tool.websearch.title": "Recherche Web",
|
||||
"settings.permissions.tool.websearch.description": "Rechercher sur le web",
|
||||
"settings.permissions.tool.codesearch.title": "Recherche de code",
|
||||
"settings.permissions.tool.codesearch.description": "Rechercher du code sur le web",
|
||||
"settings.permissions.tool.external_directory.title": "Répertoire externe",
|
||||
"settings.permissions.tool.external_directory.description": "Accéder aux fichiers en dehors du répertoire du projet",
|
||||
"settings.permissions.tool.doom_loop.title": "Boucle infernale",
|
||||
|
||||
@@ -727,8 +727,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "URLからコンテンツを取得",
|
||||
"settings.permissions.tool.websearch.title": "Web検索",
|
||||
"settings.permissions.tool.websearch.description": "ウェブを検索",
|
||||
"settings.permissions.tool.codesearch.title": "コード検索",
|
||||
"settings.permissions.tool.codesearch.description": "ウェブ上のコードを検索",
|
||||
"settings.permissions.tool.external_directory.title": "外部ディレクトリ",
|
||||
"settings.permissions.tool.external_directory.description": "プロジェクトディレクトリ外のファイルへのアクセス",
|
||||
"settings.permissions.tool.doom_loop.title": "無限ループ",
|
||||
|
||||
@@ -722,8 +722,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "URL에서 콘텐츠 가져오기",
|
||||
"settings.permissions.tool.websearch.title": "웹 검색",
|
||||
"settings.permissions.tool.websearch.description": "웹 검색",
|
||||
"settings.permissions.tool.codesearch.title": "코드 검색",
|
||||
"settings.permissions.tool.codesearch.description": "웹에서 코드 검색",
|
||||
"settings.permissions.tool.external_directory.title": "외부 디렉터리",
|
||||
"settings.permissions.tool.external_directory.description": "프로젝트 디렉터리 외부의 파일에 액세스",
|
||||
"settings.permissions.tool.doom_loop.title": "무한 반복",
|
||||
|
||||
@@ -807,8 +807,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Hent innhold fra en URL",
|
||||
"settings.permissions.tool.websearch.title": "Websøk",
|
||||
"settings.permissions.tool.websearch.description": "Søk på nettet",
|
||||
"settings.permissions.tool.codesearch.title": "Kodesøk",
|
||||
"settings.permissions.tool.codesearch.description": "Søk etter kode på nettet",
|
||||
"settings.permissions.tool.external_directory.title": "Ekstern mappe",
|
||||
"settings.permissions.tool.external_directory.description": "Få tilgang til filer utenfor prosjektmappen",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -729,8 +729,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Pobieranie zawartości z adresu URL",
|
||||
"settings.permissions.tool.websearch.title": "Wyszukiwanie w sieci",
|
||||
"settings.permissions.tool.websearch.description": "Przeszukiwanie sieci",
|
||||
"settings.permissions.tool.codesearch.title": "Wyszukiwanie kodu",
|
||||
"settings.permissions.tool.codesearch.description": "Przeszukiwanie kodu w sieci",
|
||||
"settings.permissions.tool.external_directory.title": "Katalog zewnętrzny",
|
||||
"settings.permissions.tool.external_directory.description": "Dostęp do plików poza katalogiem projektu",
|
||||
"settings.permissions.tool.doom_loop.title": "Zapętlenie",
|
||||
|
||||
@@ -808,8 +808,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Получение контента по URL",
|
||||
"settings.permissions.tool.websearch.title": "Web Search",
|
||||
"settings.permissions.tool.websearch.description": "Поиск в интернете",
|
||||
"settings.permissions.tool.codesearch.title": "Code Search",
|
||||
"settings.permissions.tool.codesearch.description": "Поиск кода в интернете",
|
||||
"settings.permissions.tool.external_directory.title": "Внешняя директория",
|
||||
"settings.permissions.tool.external_directory.description": "Доступ к файлам вне директории проекта",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -796,8 +796,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "ดึงเนื้อหาจาก URL",
|
||||
"settings.permissions.tool.websearch.title": "ค้นหาเว็บ",
|
||||
"settings.permissions.tool.websearch.description": "ค้นหาบนเว็บ",
|
||||
"settings.permissions.tool.codesearch.title": "ค้นหาโค้ด",
|
||||
"settings.permissions.tool.codesearch.description": "ค้นหาโค้ดบนเว็บ",
|
||||
"settings.permissions.tool.external_directory.title": "ไดเรกทอรีภายนอก",
|
||||
"settings.permissions.tool.external_directory.description": "เข้าถึงไฟล์นอกไดเรกทอรีโปรเจกต์",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -816,8 +816,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "Bir URL'den içerik getir",
|
||||
"settings.permissions.tool.websearch.title": "Web Ara",
|
||||
"settings.permissions.tool.websearch.description": "Web'de ara",
|
||||
"settings.permissions.tool.codesearch.title": "Kod Ara",
|
||||
"settings.permissions.tool.codesearch.description": "Web'de kod ara",
|
||||
"settings.permissions.tool.external_directory.title": "Harici Dizin",
|
||||
"settings.permissions.tool.external_directory.description": "Proje dizini dışındaki dosyalara eriş",
|
||||
"settings.permissions.tool.doom_loop.title": "Sonsuz Döngü",
|
||||
|
||||
@@ -793,8 +793,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "从 URL 获取内容",
|
||||
"settings.permissions.tool.websearch.title": "网页搜索",
|
||||
"settings.permissions.tool.websearch.description": "搜索网页",
|
||||
"settings.permissions.tool.codesearch.title": "代码搜索",
|
||||
"settings.permissions.tool.codesearch.description": "在网上搜索代码",
|
||||
"settings.permissions.tool.external_directory.title": "外部目录",
|
||||
"settings.permissions.tool.external_directory.description": "访问项目目录之外的文件",
|
||||
"settings.permissions.tool.doom_loop.title": "死循环",
|
||||
|
||||
@@ -789,8 +789,6 @@ export const dict = {
|
||||
"settings.permissions.tool.webfetch.description": "從 URL 取得內容",
|
||||
"settings.permissions.tool.websearch.title": "Web Search",
|
||||
"settings.permissions.tool.websearch.description": "搜尋網頁",
|
||||
"settings.permissions.tool.codesearch.title": "Code Search",
|
||||
"settings.permissions.tool.codesearch.description": "在網路上搜尋程式碼",
|
||||
"settings.permissions.tool.external_directory.title": "外部目錄",
|
||||
"settings.permissions.tool.external_directory.description": "存取專案目錄之外的檔案",
|
||||
"settings.permissions.tool.doom_loop.title": "Doom Loop",
|
||||
|
||||
@@ -286,7 +286,6 @@ emitted JSON Schema must stay byte-identical.
|
||||
|
||||
- [x] `src/tool/apply_patch.ts`
|
||||
- [x] `src/tool/bash.ts`
|
||||
- [x] `src/tool/codesearch.ts`
|
||||
- [x] `src/tool/edit.ts`
|
||||
- [x] `src/tool/glob.ts`
|
||||
- [x] `src/tool/grep.ts`
|
||||
|
||||
@@ -40,7 +40,6 @@ These exported tool definitions currently use `Tool.define(...)` in `src/tool`:
|
||||
|
||||
- [x] `apply_patch.ts`
|
||||
- [x] `bash.ts`
|
||||
- [x] `codesearch.ts`
|
||||
- [x] `edit.ts`
|
||||
- [x] `glob.ts`
|
||||
- [x] `grep.ts`
|
||||
@@ -79,7 +78,6 @@ Notable items that are already effectively on the target path and do not need se
|
||||
- `apply_patch.ts`
|
||||
- `grep.ts`
|
||||
- `write.ts`
|
||||
- `codesearch.ts`
|
||||
- `websearch.ts`
|
||||
- `edit.ts`
|
||||
|
||||
|
||||
@@ -169,7 +169,6 @@ export const layer = Layer.effect(
|
||||
bash: "allow",
|
||||
webfetch: "allow",
|
||||
websearch: "allow",
|
||||
codesearch: "allow",
|
||||
read: "allow",
|
||||
external_directory: {
|
||||
"*": "ask",
|
||||
|
||||
@@ -28,7 +28,6 @@ const AVAILABLE_PERMISSIONS = [
|
||||
"task",
|
||||
"todowrite",
|
||||
"websearch",
|
||||
"codesearch",
|
||||
"lsp",
|
||||
"skill",
|
||||
]
|
||||
|
||||
@@ -19,7 +19,6 @@ import { ReadTool } from "../../tool/read"
|
||||
import { WebFetchTool } from "../../tool/webfetch"
|
||||
import { EditTool } from "../../tool/edit"
|
||||
import { WriteTool } from "../../tool/write"
|
||||
import { CodeSearchTool } from "../../tool/codesearch"
|
||||
import { WebSearchTool } from "../../tool/websearch"
|
||||
import { TaskTool } from "../../tool/task"
|
||||
import { SkillTool } from "../../tool/skill"
|
||||
@@ -145,13 +144,6 @@ function edit(info: ToolProps<typeof EditTool>) {
|
||||
)
|
||||
}
|
||||
|
||||
function codesearch(info: ToolProps<typeof CodeSearchTool>) {
|
||||
inline({
|
||||
icon: "◇",
|
||||
title: `Exa Code Search "${info.input.query}"`,
|
||||
})
|
||||
}
|
||||
|
||||
function websearch(info: ToolProps<typeof WebSearchTool>) {
|
||||
inline({
|
||||
icon: "◈",
|
||||
@@ -415,7 +407,6 @@ export const RunCommand = cmd({
|
||||
if (part.tool === "write") return write(props<typeof WriteTool>(part))
|
||||
if (part.tool === "webfetch") return webfetch(props<typeof WebFetchTool>(part))
|
||||
if (part.tool === "edit") return edit(props<typeof EditTool>(part))
|
||||
if (part.tool === "codesearch") return codesearch(props<typeof CodeSearchTool>(part))
|
||||
if (part.tool === "websearch") return websearch(props<typeof WebSearchTool>(part))
|
||||
if (part.tool === "task") return task(props<typeof TaskTool>(part))
|
||||
if (part.tool === "todowrite") return todo(props<typeof TodoWriteTool>(part))
|
||||
|
||||
@@ -44,7 +44,6 @@ import type { GrepTool } from "@/tool/grep"
|
||||
import type { EditTool } from "@/tool/edit"
|
||||
import type { ApplyPatchTool } from "@/tool/apply_patch"
|
||||
import type { WebFetchTool } from "@/tool/webfetch"
|
||||
import type { CodeSearchTool } from "@/tool/codesearch"
|
||||
import type { WebSearchTool } from "@/tool/websearch"
|
||||
import type { TaskTool } from "@/tool/task"
|
||||
import type { QuestionTool } from "@/tool/question"
|
||||
@@ -1565,9 +1564,6 @@ function ToolPart(props: { last: boolean; part: ToolPart; message: AssistantMess
|
||||
<Match when={props.part.tool === "webfetch"}>
|
||||
<WebFetch {...toolprops} />
|
||||
</Match>
|
||||
<Match when={props.part.tool === "codesearch"}>
|
||||
<CodeSearch {...toolprops} />
|
||||
</Match>
|
||||
<Match when={props.part.tool === "websearch"}>
|
||||
<WebSearch {...toolprops} />
|
||||
</Match>
|
||||
@@ -1948,15 +1944,6 @@ function WebFetch(props: ToolProps<typeof WebFetchTool>) {
|
||||
)
|
||||
}
|
||||
|
||||
function CodeSearch(props: ToolProps<typeof CodeSearchTool>) {
|
||||
const metadata = props.metadata as { results?: number }
|
||||
return (
|
||||
<InlineTool icon="◇" pending="Searching code..." complete={props.input.query} part={props.part}>
|
||||
Exa Code Search "{props.input.query}" <Show when={metadata.results}>({metadata.results} results)</Show>
|
||||
</InlineTool>
|
||||
)
|
||||
}
|
||||
|
||||
function WebSearch(props: ToolProps<typeof WebSearchTool>) {
|
||||
const metadata = props.metadata as { numResults?: number }
|
||||
return (
|
||||
|
||||
@@ -350,21 +350,6 @@ export function PermissionPrompt(props: { request: PermissionRequest }) {
|
||||
}
|
||||
}
|
||||
|
||||
if (permission === "codesearch") {
|
||||
const query = typeof data.query === "string" ? data.query : ""
|
||||
return {
|
||||
icon: "◇",
|
||||
title: `Exa Code Search "${query}"`,
|
||||
body: (
|
||||
<Show when={query}>
|
||||
<box paddingLeft={1}>
|
||||
<text fg={theme.textMuted}>{"Query: " + query}</text>
|
||||
</box>
|
||||
</Show>
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
if (permission === "external_directory") {
|
||||
const meta = props.request.metadata ?? {}
|
||||
const parent = typeof meta["parentDir"] === "string" ? meta["parentDir"] : undefined
|
||||
|
||||
@@ -35,7 +35,6 @@ const InputObject = Schema.StructWithRest(
|
||||
question: Schema.optional(Action),
|
||||
webfetch: Schema.optional(Action),
|
||||
websearch: Schema.optional(Action),
|
||||
codesearch: Schema.optional(Action),
|
||||
lsp: Schema.optional(Rule),
|
||||
doom_loop: Schema.optional(Action),
|
||||
skill: Schema.optional(Rule),
|
||||
|
||||
@@ -91,7 +91,7 @@ Remember that you MUST add links for all workspace files, for example: [path/to/
|
||||
</codeSearchInstructions>
|
||||
<codeSearchToolUseInstructions>
|
||||
These instructions only apply when the question is about the user's workspace.
|
||||
Unless it is clear that the user's question relates to the current workspace, you should avoid using the code search tools and instead prefer to answer the user's question directly.
|
||||
Unless it is clear that the user's question relates to the current workspace, you should avoid using workspace search tools and instead prefer to answer the user's question directly.
|
||||
Remember that you can call multiple tools in one response.
|
||||
Use semantic_search to search for high level concepts or descriptions of functionality in the user's question. This is the best place to start if you don't know where to look or the exact strings found in the codebase.
|
||||
Prefer search_workspace_symbols over grep_search when you have precise code identifiers to search for.
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
import { Effect, Schema } from "effect"
|
||||
import { HttpClient } from "effect/unstable/http"
|
||||
import * as Tool from "./tool"
|
||||
import * as McpExa from "./mcp-exa"
|
||||
import DESCRIPTION from "./codesearch.txt"
|
||||
|
||||
export const Parameters = Schema.Struct({
|
||||
query: Schema.String.annotate({
|
||||
description:
|
||||
"Search query to find relevant context for APIs, Libraries, and SDKs. For example, 'React useState hook examples', 'Python pandas dataframe filtering', 'Express.js middleware', 'Next js partial prerendering configuration'",
|
||||
}),
|
||||
tokensNum: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1000))
|
||||
.check(Schema.isLessThanOrEqualTo(50000))
|
||||
.pipe(Schema.optional, Schema.withDecodingDefault(Effect.succeed(5000)))
|
||||
.annotate({
|
||||
description:
|
||||
"Number of tokens to return (1000-50000). Default is 5000 tokens. Adjust this value based on how much context you need - use lower values for focused queries and higher values for comprehensive documentation.",
|
||||
}),
|
||||
})
|
||||
|
||||
export const CodeSearchTool = Tool.define(
|
||||
"codesearch",
|
||||
Effect.gen(function* () {
|
||||
const http = yield* HttpClient.HttpClient
|
||||
|
||||
return {
|
||||
description: DESCRIPTION,
|
||||
parameters: Parameters,
|
||||
execute: (params: { query: string; tokensNum: number }, ctx: Tool.Context) =>
|
||||
Effect.gen(function* () {
|
||||
yield* ctx.ask({
|
||||
permission: "codesearch",
|
||||
patterns: [params.query],
|
||||
always: ["*"],
|
||||
metadata: {
|
||||
query: params.query,
|
||||
tokensNum: params.tokensNum,
|
||||
},
|
||||
})
|
||||
|
||||
const result = yield* McpExa.call(
|
||||
http,
|
||||
"get_code_context_exa",
|
||||
McpExa.CodeArgs,
|
||||
{
|
||||
query: params.query,
|
||||
tokensNum: params.tokensNum,
|
||||
},
|
||||
"30 seconds",
|
||||
)
|
||||
|
||||
return {
|
||||
output:
|
||||
result ??
|
||||
"No code snippets or documentation found. Please try a different query, be more specific about the library or programming concept, or check the spelling of framework names.",
|
||||
title: `Code search: ${params.query}`,
|
||||
metadata: {},
|
||||
}
|
||||
}).pipe(Effect.orDie),
|
||||
}
|
||||
}),
|
||||
)
|
||||
@@ -1,12 +0,0 @@
|
||||
- Search and get relevant context for any programming task using Exa Code API
|
||||
- Provides the highest quality and freshest context for libraries, SDKs, and APIs
|
||||
- Use this tool for ANY question or task related to programming
|
||||
- Returns comprehensive code examples, documentation, and API references
|
||||
- Optimized for finding specific programming patterns and solutions
|
||||
|
||||
Usage notes:
|
||||
- Adjustable token count (1000-50000) for focused or comprehensive results
|
||||
- Default 5000 tokens provides balanced context for most queries
|
||||
- Use lower values for specific questions, higher values for comprehensive documentation
|
||||
- Supports queries about frameworks, libraries, APIs, and programming concepts
|
||||
- Examples: 'React useState hook examples', 'Python pandas dataframe filtering', 'Express.js middleware'
|
||||
@@ -35,11 +35,6 @@ export const SearchArgs = Schema.Struct({
|
||||
contextMaxCharacters: Schema.optional(Schema.Number),
|
||||
})
|
||||
|
||||
export const CodeArgs = Schema.Struct({
|
||||
query: Schema.String,
|
||||
tokensNum: Schema.Number,
|
||||
})
|
||||
|
||||
const McpRequest = <F extends Schema.Struct.Fields>(args: Schema.Struct<F>) =>
|
||||
Schema.Struct({
|
||||
jsonrpc: Schema.Literal("2.0"),
|
||||
|
||||
@@ -22,7 +22,6 @@ import { Plugin } from "../plugin"
|
||||
import { Provider } from "@/provider/provider"
|
||||
import { ProviderID, type ModelID } from "../provider/schema"
|
||||
import { WebSearchTool } from "./websearch"
|
||||
import { CodeSearchTool } from "./codesearch"
|
||||
import { Flag } from "@opencode-ai/core/flag/flag"
|
||||
import * as Log from "@opencode-ai/core/util/log"
|
||||
import { LspTool } from "./lsp"
|
||||
@@ -108,7 +107,6 @@ export const layer: Layer.Layer<
|
||||
const webfetch = yield* WebFetchTool
|
||||
const websearch = yield* WebSearchTool
|
||||
const bash = yield* BashTool
|
||||
const codesearch = yield* CodeSearchTool
|
||||
const globtool = yield* GlobTool
|
||||
const writetool = yield* WriteTool
|
||||
const edit = yield* EditTool
|
||||
@@ -198,7 +196,6 @@ export const layer: Layer.Layer<
|
||||
fetch: Tool.init(webfetch),
|
||||
todo: Tool.init(todo),
|
||||
search: Tool.init(websearch),
|
||||
code: Tool.init(codesearch),
|
||||
skill: Tool.init(skilltool),
|
||||
patch: Tool.init(patchtool),
|
||||
question: Tool.init(question),
|
||||
@@ -221,7 +218,6 @@ export const layer: Layer.Layer<
|
||||
tool.fetch,
|
||||
tool.todo,
|
||||
tool.search,
|
||||
tool.code,
|
||||
tool.skill,
|
||||
tool.patch,
|
||||
...(Flag.OPENCODE_EXPERIMENTAL_LSP_TOOL ? [tool.lsp] : []),
|
||||
@@ -278,7 +274,7 @@ export const layer: Layer.Layer<
|
||||
|
||||
const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) {
|
||||
const filtered = (yield* all()).filter((tool) => {
|
||||
if (tool.id === CodeSearchTool.id || tool.id === WebSearchTool.id) {
|
||||
if (tool.id === WebSearchTool.id) {
|
||||
return input.providerID === ProviderID.opencode || Flag.OPENCODE_ENABLE_EXA
|
||||
}
|
||||
|
||||
|
||||
@@ -60,29 +60,6 @@ Output: Creates directory 'foo'"
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`tool parameters JSON Schema (wire shape) codesearch 1`] = `
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"properties": {
|
||||
"query": {
|
||||
"description": "Search query to find relevant context for APIs, Libraries, and SDKs. For example, 'React useState hook examples', 'Python pandas dataframe filtering', 'Express.js middleware', 'Next js partial prerendering configuration'",
|
||||
"type": "string",
|
||||
},
|
||||
"tokensNum": {
|
||||
"default": 5000,
|
||||
"description": "Number of tokens to return (1000-50000). Default is 5000 tokens. Adjust this value based on how much context you need - use lower values for focused queries and higher values for comprehensive documentation.",
|
||||
"maximum": 50000,
|
||||
"minimum": 1000,
|
||||
"type": "integer",
|
||||
},
|
||||
},
|
||||
"required": [
|
||||
"query",
|
||||
],
|
||||
"type": "object",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`tool parameters JSON Schema (wire shape) edit 1`] = `
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
|
||||
@@ -11,7 +11,6 @@ import { toJsonSchema } from "../../src/util/effect-zod"
|
||||
|
||||
import { Parameters as ApplyPatch } from "../../src/tool/apply_patch"
|
||||
import { Parameters as Bash } from "../../src/tool/bash"
|
||||
import { Parameters as CodeSearch } from "../../src/tool/codesearch"
|
||||
import { Parameters as Edit } from "../../src/tool/edit"
|
||||
import { Parameters as Glob } from "../../src/tool/glob"
|
||||
import { Parameters as Grep } from "../../src/tool/grep"
|
||||
@@ -37,7 +36,6 @@ describe("tool parameters", () => {
|
||||
describe("JSON Schema (wire shape)", () => {
|
||||
test("apply_patch", () => expect(toJsonSchema(ApplyPatch)).toMatchSnapshot())
|
||||
test("bash", () => expect(toJsonSchema(Bash)).toMatchSnapshot())
|
||||
test("codesearch", () => expect(toJsonSchema(CodeSearch)).toMatchSnapshot())
|
||||
test("edit", () => expect(toJsonSchema(Edit)).toMatchSnapshot())
|
||||
test("glob", () => expect(toJsonSchema(Glob)).toMatchSnapshot())
|
||||
test("grep", () => expect(toJsonSchema(Grep)).toMatchSnapshot())
|
||||
@@ -85,21 +83,6 @@ describe("tool parameters", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("codesearch", () => {
|
||||
test("accepts query; tokensNum defaults to 5000", () => {
|
||||
expect(parse(CodeSearch, { query: "hooks" })).toEqual({ query: "hooks", tokensNum: 5000 })
|
||||
})
|
||||
test("accepts override tokensNum", () => {
|
||||
expect(parse(CodeSearch, { query: "hooks", tokensNum: 10000 }).tokensNum).toBe(10000)
|
||||
})
|
||||
test("rejects tokensNum under 1000", () => {
|
||||
expect(accepts(CodeSearch, { query: "x", tokensNum: 500 })).toBe(false)
|
||||
})
|
||||
test("rejects tokensNum over 50000", () => {
|
||||
expect(accepts(CodeSearch, { query: "x", tokensNum: 60000 })).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe("edit", () => {
|
||||
test("accepts all four fields", () => {
|
||||
expect(parse(Edit, { filePath: "/a", oldString: "x", newString: "y", replaceAll: true })).toEqual({
|
||||
|
||||
@@ -1221,7 +1221,6 @@ export type PermissionConfig =
|
||||
question?: PermissionActionConfig
|
||||
webfetch?: PermissionActionConfig
|
||||
websearch?: PermissionActionConfig
|
||||
codesearch?: PermissionActionConfig
|
||||
lsp?: PermissionRuleConfig
|
||||
doom_loop?: PermissionActionConfig
|
||||
skill?: PermissionRuleConfig
|
||||
|
||||
@@ -11231,9 +11231,6 @@
|
||||
"websearch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"codesearch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"lsp": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
|
||||
@@ -356,12 +356,6 @@ export function getToolInfo(tool: string, input: any = {}): ToolInfo {
|
||||
title: i18n.t("ui.tool.websearch"),
|
||||
subtitle: input.query,
|
||||
}
|
||||
case "codesearch":
|
||||
return {
|
||||
icon: "code",
|
||||
title: i18n.t("ui.tool.codesearch"),
|
||||
subtitle: input.query,
|
||||
}
|
||||
case "task": {
|
||||
const type =
|
||||
typeof input.subagent_type === "string" && input.subagent_type
|
||||
@@ -1710,32 +1704,6 @@ ToolRegistry.register({
|
||||
},
|
||||
})
|
||||
|
||||
ToolRegistry.register({
|
||||
name: "codesearch",
|
||||
render(props) {
|
||||
const i18n = useI18n()
|
||||
const query = createMemo(() => {
|
||||
const value = props.input.query
|
||||
if (typeof value !== "string") return ""
|
||||
return value
|
||||
})
|
||||
|
||||
return (
|
||||
<BasicTool
|
||||
{...props}
|
||||
icon="code"
|
||||
trigger={{
|
||||
title: i18n.t("ui.tool.codesearch"),
|
||||
subtitle: query(),
|
||||
subtitleClass: "exa-tool-query",
|
||||
}}
|
||||
>
|
||||
<ExaOutput output={props.output} />
|
||||
</BasicTool>
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
ToolRegistry.register({
|
||||
name: "task",
|
||||
render(props) {
|
||||
|
||||
@@ -43,10 +43,6 @@ const samples = [
|
||||
tool: "websearch",
|
||||
error: "websearch Rate limited: Please try again in 30 seconds",
|
||||
},
|
||||
{
|
||||
tool: "codesearch",
|
||||
error: "codesearch Timeout: exceeded 120s",
|
||||
},
|
||||
{
|
||||
tool: "question",
|
||||
error: "question Dismissed: user dismissed this question",
|
||||
@@ -72,7 +68,7 @@ export default {
|
||||
argTypes: {
|
||||
tool: {
|
||||
control: "select",
|
||||
options: ["apply_patch", "bash", "read", "glob", "grep", "webfetch", "websearch", "codesearch", "question"],
|
||||
options: ["apply_patch", "bash", "read", "glob", "grep", "webfetch", "websearch", "question"],
|
||||
},
|
||||
error: {
|
||||
control: "text",
|
||||
|
||||
@@ -33,7 +33,6 @@ export function ToolErrorCard(props: ToolErrorCardProps) {
|
||||
task: "ui.tool.task",
|
||||
webfetch: "ui.tool.webfetch",
|
||||
websearch: "ui.tool.websearch",
|
||||
codesearch: "ui.tool.codesearch",
|
||||
bash: "ui.tool.shell",
|
||||
apply_patch: "ui.tool.patch",
|
||||
question: "ui.tool.questions",
|
||||
|
||||
@@ -95,7 +95,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "جلب الويب",
|
||||
"ui.tool.websearch": "بحث الويب",
|
||||
"ui.tool.codesearch": "بحث الكود",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "تصحيح",
|
||||
"ui.tool.todos": "المهام",
|
||||
|
||||
@@ -95,7 +95,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Buscar Web",
|
||||
"ui.tool.websearch": "Pesquisa na Web",
|
||||
"ui.tool.codesearch": "Pesquisa de Código",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Tarefas",
|
||||
|
||||
@@ -99,7 +99,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Web preuzimanje",
|
||||
"ui.tool.websearch": "Pretraga weba",
|
||||
"ui.tool.codesearch": "Pretraga koda",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Lista zadataka",
|
||||
|
||||
@@ -94,7 +94,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webhentning",
|
||||
"ui.tool.websearch": "Websøgning",
|
||||
"ui.tool.codesearch": "Kodesøgning",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Opgaver",
|
||||
|
||||
@@ -100,7 +100,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webabruf",
|
||||
"ui.tool.websearch": "Websuche",
|
||||
"ui.tool.codesearch": "Codesuche",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Aufgaben",
|
||||
|
||||
@@ -108,7 +108,6 @@ export const dict: Record<string, string> = {
|
||||
"ui.tool.task": "Task",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "Web Search",
|
||||
"ui.tool.codesearch": "Code Search",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "To-dos",
|
||||
|
||||
@@ -95,7 +95,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "Búsqueda web",
|
||||
"ui.tool.codesearch": "Búsqueda de código",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Parche",
|
||||
"ui.tool.todos": "Tareas",
|
||||
|
||||
@@ -95,7 +95,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "Recherche Web",
|
||||
"ui.tool.codesearch": "Recherche de code",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Tâches",
|
||||
|
||||
@@ -94,7 +94,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "Web検索",
|
||||
"ui.tool.codesearch": "コード検索",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Todo",
|
||||
|
||||
@@ -95,7 +95,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "웹 가져오기",
|
||||
"ui.tool.websearch": "웹 검색",
|
||||
"ui.tool.codesearch": "코드 검색",
|
||||
"ui.tool.shell": "셸",
|
||||
"ui.tool.patch": "패치",
|
||||
"ui.tool.todos": "할 일",
|
||||
|
||||
@@ -98,7 +98,6 @@ export const dict: Record<Keys, string> = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webhenting",
|
||||
"ui.tool.websearch": "Nettsøk",
|
||||
"ui.tool.codesearch": "Kodesøk",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Gjøremål",
|
||||
|
||||
@@ -94,7 +94,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Pobieranie sieciowe",
|
||||
"ui.tool.websearch": "Wyszukiwanie w sieci",
|
||||
"ui.tool.codesearch": "Wyszukiwanie kodu",
|
||||
"ui.tool.shell": "Terminal",
|
||||
"ui.tool.patch": "Patch",
|
||||
"ui.tool.todos": "Zadania",
|
||||
|
||||
@@ -94,7 +94,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "Веб-поиск",
|
||||
"ui.tool.codesearch": "Поиск кода",
|
||||
"ui.tool.shell": "Оболочка",
|
||||
"ui.tool.patch": "Патч",
|
||||
"ui.tool.todos": "Задачи",
|
||||
|
||||
@@ -96,7 +96,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "ดึงจากเว็บ",
|
||||
"ui.tool.websearch": "ค้นหาเว็บ",
|
||||
"ui.tool.codesearch": "ค้นหาโค้ด",
|
||||
"ui.tool.shell": "เชลล์",
|
||||
"ui.tool.patch": "แพตช์",
|
||||
"ui.tool.todos": "รายการงาน",
|
||||
|
||||
@@ -101,7 +101,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Web getir",
|
||||
"ui.tool.websearch": "Web Araması",
|
||||
"ui.tool.codesearch": "Kod Araması",
|
||||
"ui.tool.shell": "Kabuk",
|
||||
"ui.tool.patch": "Yama",
|
||||
"ui.tool.todos": "Görevler",
|
||||
|
||||
@@ -99,7 +99,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "网络搜索",
|
||||
"ui.tool.codesearch": "代码搜索",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "补丁",
|
||||
"ui.tool.todos": "待办",
|
||||
|
||||
@@ -99,7 +99,6 @@ export const dict = {
|
||||
"ui.tool.grep": "Grep",
|
||||
"ui.tool.webfetch": "Webfetch",
|
||||
"ui.tool.websearch": "網頁搜尋",
|
||||
"ui.tool.codesearch": "程式碼搜尋",
|
||||
"ui.tool.shell": "Shell",
|
||||
"ui.tool.patch": "修補",
|
||||
"ui.tool.todos": "待辦",
|
||||
|
||||
@@ -434,7 +434,6 @@ The available permission keys are:
|
||||
| `todowrite` | `todowrite`, `todoread` |
|
||||
| `webfetch` | `webfetch` |
|
||||
| `websearch` | `websearch` |
|
||||
| `codesearch` | `codesearch` |
|
||||
| `lsp` | `lsp` |
|
||||
| `skill` | `skill` |
|
||||
| `question` | `question` |
|
||||
|
||||
@@ -138,7 +138,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
- `skill` — تحميل مهارة (يطابق اسم المهارة)
|
||||
- `lsp` — تشغيل استعلامات LSP (حاليًا دون قواعد دقيقة)
|
||||
- `webfetch` — جلب عنوان URL (يطابق الـ URL)
|
||||
- `websearch`, `codesearch` — بحث الويب/الكود (يطابق الاستعلام)
|
||||
- `websearch` — بحث الويب (يطابق الاستعلام)
|
||||
- `external_directory` — يُفعَّل عندما تلمس أداة مسارات خارج دليل عمل المشروع
|
||||
- `doom_loop` — يُفعَّل عندما يتكرر نفس استدعاء الأداة 3 مرات مع نفس المُدخلات
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Dozvole OpenCode su označene imenom alata, plus nekoliko sigurnosnih mjera:
|
||||
- `skill` — učitavanje vještine (odgovara nazivu vještine)
|
||||
- `lsp` — pokretanje LSP upita (trenutno negranularno)
|
||||
- `webfetch` — dohvaćanje URL-a (odgovara URL-u)
|
||||
- `websearch`, `codesearch` — pretraživanje weba/koda (odgovara upitu)
|
||||
- `websearch` — pretraživanje weba (odgovara upitu)
|
||||
- `external_directory` — pokreće se kada alat dodirne staze izvan radnog direktorija projekta
|
||||
- `doom_loop` — aktivira se kada se isti poziv alata ponovi 3 puta sa identičnim unosom
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ This command will guide you through creating a new agent with a custom system pr
|
||||
| `--path` | Directory to write the agent file to (defaults to global or `.opencode/agent` based on the prompt) |
|
||||
| `--description` | What the agent should do |
|
||||
| `--mode` | Agent mode: `all`, `primary`, or `subagent` |
|
||||
| `--permissions` | Comma-separated list of permissions to allow (default: all). Available: `bash`, `read`, `edit`, `glob`, `grep`, `webfetch`, `task`, `todowrite`, `websearch`, `codesearch`, `lsp`, `skill`. Anything omitted is denied. Alias: `--tools` |
|
||||
| `--permissions` | Comma-separated list of permissions to allow (default: all). Available: `bash`, `read`, `edit`, `glob`, `grep`, `webfetch`, `task`, `todowrite`, `websearch`, `lsp`, `skill`. Anything omitted is denied. Alias: `--tools` |
|
||||
| `--model`, `-m` | Model to use, in `provider/model` format |
|
||||
|
||||
Passing all of `--path`, `--description`, `--mode`, and `--permissions` runs the command non-interactively.
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode tilladelser indtastes efter værktøjsnavn plus et par sikkerhedsafskæ
|
||||
- `skill` — indlæsning af en færdighed (matcher færdighedsnavnet)
|
||||
- `lsp` — kører LSP forespørgsler (i øjeblikket ikke-granulære)
|
||||
- `webfetch` — henter en URL (matcher URL)
|
||||
- `websearch`, `codesearch` — web/code søgning (matcher forespørgslen)
|
||||
- `websearch` — websøgning (matcher forespørgslen)
|
||||
- `external_directory` — udløses, når et værktøj berører stier uden for projektets arbejdsmappe
|
||||
- `doom_loop` — udløses, når det samme værktøjskald gentages 3 gange med identisk input
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode-Berechtigungen basieren auf Tool-Namen sowie einigen Sicherheitsvorkehr
|
||||
- `skill` – Laden einer Fertigkeit (entspricht dem Fertigkeitsnamen)
|
||||
- `lsp` – Ausführen von LSP-Abfragen (derzeit nicht granular)
|
||||
- `webfetch` – Abrufen eines URL (entspricht dem URL)
|
||||
- `websearch`, `codesearch` – web/code Suche (entspricht der Abfrage)
|
||||
- `websearch` – Websuche (entspricht der Abfrage)
|
||||
- `external_directory` – wird ausgelöst, wenn ein Tool Pfade außerhalb des Projektarbeitsverzeichnisses berührt
|
||||
- `doom_loop` – wird ausgelöst, wenn derselbe Werkzeugaufruf dreimal mit identischer Eingabe wiederholt wird
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ Los permisos OpenCode están codificados por el nombre de la herramienta, ademá
|
||||
- `skill` — cargar una habilidad (coincide con el nombre de la habilidad)
|
||||
- `lsp`: ejecución de consultas LSP (actualmente no granulares)
|
||||
- `webfetch` — obteniendo una URL (coincide con la URL)
|
||||
- `websearch`, `codesearch` — búsqueda web/código (coincide con la consulta)
|
||||
- `websearch` — búsqueda web (coincide con la consulta)
|
||||
- `external_directory`: se activa cuando una herramienta toca rutas fuera del directorio de trabajo del proyecto.
|
||||
- `doom_loop`: se activa cuando la misma llamada de herramienta se repite 3 veces con entrada idéntica
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ Les autorisations OpenCode sont classées par nom d'outil, plus quelques garde-f
|
||||
- `skill` — chargement d'une compétence (correspond au nom de la compétence)
|
||||
- `lsp` — exécution de requêtes LSP (actuellement non granulaires)
|
||||
- `webfetch` — récupérer une URL (correspond à l'URL)
|
||||
- `websearch`, `codesearch` — recherche Web/code (correspond à la requête)
|
||||
- `websearch` — recherche Web (correspond à la requête)
|
||||
- `external_directory` - déclenché lorsqu'un outil touche des chemins en dehors du répertoire de travail du projet
|
||||
- `doom_loop` — déclenché lorsque le même appel d'outil se répète 3 fois avec une entrée identique
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ I permessi di OpenCode sono indicizzati per nome dello strumento, piu' un paio d
|
||||
- `skill` — caricamento di una skill (corrisponde al nome della skill)
|
||||
- `lsp` — esecuzione query LSP (attualmente non granulare)
|
||||
- `webfetch` — fetch di un URL (corrisponde all'URL)
|
||||
- `websearch`, `codesearch` — ricerca web/codice (corrisponde alla query)
|
||||
- `websearch` — ricerca web (corrisponde alla query)
|
||||
- `external_directory` — si attiva quando uno strumento tocca percorsi fuori dalla working directory del progetto
|
||||
- `doom_loop` — si attiva quando la stessa chiamata a uno strumento si ripete 3 volte con input identico
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode の権限は、ツール名に加えて、いくつかの安全対策
|
||||
- `skill` — スキルをロードしています(スキル名と一致します)
|
||||
- `lsp` — LSP クエリの実行 (現在は非細分性)
|
||||
- `webfetch` — URL を取得します (URL と一致します)
|
||||
- `websearch`、`codesearch` — Web/コード検索 (クエリと一致)
|
||||
- `websearch` — Web検索 (クエリと一致)
|
||||
- `external_directory` — ツールがプロジェクトの作業ディレクトリ外のパスにアクセスするとトリガーされます。
|
||||
- `doom_loop` — 同じ入力で同じツール呼び出しが 3 回繰り返されたときにトリガーされます。
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ opencode 권한은 도구 이름에 의해 키 입력되며, 두 개의 안전
|
||||
- `skill` - 기술을 로딩 (기술 이름을 매칭)
|
||||
- `lsp` - LSP 쿼리 실행 (현재 비 과립)
|
||||
- `webfetch` - URL을 fetching ( URL을 매칭)
|
||||
- `websearch`, `codesearch` - 웹 / 코드 검색 (문자 쿼리)
|
||||
- `websearch` - 웹 검색 (문자 쿼리)
|
||||
- `external_directory` - 프로젝트 작업 디렉토리 외부의 도구 접촉 경로 때 트리거
|
||||
- `doom_loop` - 동일한 도구 호출이 동일한 입력으로 3 번 반복 할 때 트리거
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode-tillatelser tastes inn etter verktøynavn, pluss et par sikkerhetsvakte
|
||||
- `skill` — laster en ferdighet (tilsvarer navnet på ferdigheten)
|
||||
- `lsp` — kjører LSP-spørringer (for øyeblikket ikke-granulære)
|
||||
- `webfetch` — henter en URL (tilsvarer URL)
|
||||
- `websearch`, `codesearch` - nett-/kodesøk (samsvarer med søket)
|
||||
- `websearch` - nettsøk (samsvarer med søket)
|
||||
- `external_directory` - utløses når et verktøy berører stier utenfor prosjektets arbeidskatalog
|
||||
- `doom_loop` — utløses når det samme verktøykallet gjentas 3 ganger med identisk inndata
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ OpenCode permissions are keyed by tool name, plus a couple of safety guards:
|
||||
- `lsp` — running LSP queries (currently non-granular)
|
||||
- `question` — asking the user questions during execution
|
||||
- `webfetch` — fetching a URL (matches the URL)
|
||||
- `websearch`, `codesearch` — web/code search (matches the query)
|
||||
- `websearch` — web search (matches the query)
|
||||
- `external_directory` — triggered when a tool touches paths outside the project working directory
|
||||
- `doom_loop` — triggered when the same tool call repeats 3 times with identical input
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ Uprawnienia opencode są określane na podstawie nazwy narzędzia i kilku zabezp
|
||||
- `skill` — ładowanie umiejętności (pasuje do nazwy umiejętności)
|
||||
- `lsp` — uruchamianie zapytań LSP (obecnie nieszczegółowych)
|
||||
- `webfetch` — pobieranie adresu URL (pasuje do adresu URL)
|
||||
- `websearch`, `codesearch` — wyszukiwanie sieci/kodu (pasuje do zapytań)
|
||||
- `websearch` — wyszukiwanie sieci (pasuje do zapytań)
|
||||
- `external_directory` — wywoływacz, gdy narzędzie jest dostępne poza katalogiem roboczym projektu
|
||||
- `doom_loop` — wyzwalane, gdy samo wywołanie narzędzia zostanie powtórzone 3 razy z tymi samymi danymi podstawowymi
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ As permissões do opencode são indexadas pelo nome da ferramenta, além de algu
|
||||
- `skill` — carregamento de uma habilidade (corresponde ao nome da habilidade)
|
||||
- `lsp` — execução de consultas LSP (atualmente não granular)
|
||||
- `webfetch` — busca de uma URL (corresponde à URL)
|
||||
- `websearch`, `codesearch` — busca na web/código (corresponde à consulta)
|
||||
- `websearch` — busca na web (corresponde à consulta)
|
||||
- `external_directory` — acionado quando uma ferramenta toca em caminhos fora do diretório de trabalho do projeto
|
||||
- `doom_loop` — acionado quando a mesma chamada de ferramenta se repete 3 vezes com entrada idêntica
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ opencode использует конфигурацию `permission`, чтобы
|
||||
- `skill` — загрузка навыка (соответствует названию навыка)
|
||||
- `lsp` — выполнение запросов LSP (в настоящее время не детализированных)
|
||||
- `webfetch` — получение URL-адреса (соответствует URL-адресу)
|
||||
- `websearch`, `codesearch` — поиск в сети/коде (соответствует запросу)
|
||||
- `websearch` — поиск в сети (соответствует запросу)
|
||||
- `external_directory` — срабатывает, когда инструмент касается путей за пределами рабочего каталога проекта.
|
||||
- `doom_loop` — срабатывает, когда один и тот же вызов инструмента повторяется 3 раза с одинаковым вводом.
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode ใช้การกำหนดค่า `permission` เพื่อ
|
||||
- `skill` — กำลังโหลดทักษะ (ตรงกับชื่อทักษะ)
|
||||
- `lsp` — กำลังเรียกใช้คำสั่ง LSP (ปัจจุบันยังไม่ละเอียด)
|
||||
- `webfetch` — กำลังดึง URL (ตรงกับ URL)
|
||||
- `websearch`, `codesearch` — การค้นหาเว็บ/code (ตรงกับข้อความค้นหา)
|
||||
- `websearch` — การค้นหาเว็บ (ตรงกับข้อความค้นหา)
|
||||
- `external_directory` — ทริกเกอร์เมื่อเครื่องมือแตะเส้นทางนอกไดเร็กทอรีการทำงานของโปรเจ็กต์
|
||||
- `doom_loop` — ทริกเกอร์เมื่อมีการเรียกใช้เครื่องมือเดียวกันซ้ำ 3 ครั้งโดยมีอินพุตเหมือนกัน
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ opencode izinleri araç adına ve birkaç güvenlik önlemine göre anahtarlanı
|
||||
- `skill` — bir skill yükleniyor (skill adıyla eşleşir)
|
||||
- `lsp` — LSP sorgularını çalıştırıyor (şu anda ayrıntılı değil)
|
||||
- `webfetch` — URL getiriliyor (URL ile eşleşiyor)
|
||||
- `websearch`, `codesearch` — web/kod arama (sorguyla eşleşir)
|
||||
- `websearch` — web arama (sorguyla eşleşir)
|
||||
- `external_directory` — bir araç proje çalışma dizini dışındaki yollara dokunduğunda tetiklenir
|
||||
- `doom_loop` — aynı araç çağrısı aynı girdiyle 3 kez tekrarlandığında tetiklenir
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode 的权限以工具名称为键,外加几个安全防护项:
|
||||
- `skill` — 加载技能(匹配技能名称)
|
||||
- `lsp` — 运行 LSP 查询(当前不支持细粒度配置)
|
||||
- `webfetch` — 获取 URL(匹配 URL)
|
||||
- `websearch`、`codesearch` — 网页/代码搜索(匹配查询内容)
|
||||
- `websearch` — 网页搜索(匹配查询内容)
|
||||
- `external_directory` — 当工具访问项目工作目录之外的路径时触发
|
||||
- `doom_loop` — 当同一工具调用以相同输入重复 3 次时触发
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ OpenCode 的權限以工具名稱為鍵,外加幾個安全防護項:
|
||||
- `skill` — 載入技能(比對技能名稱)
|
||||
- `lsp` — 執行 LSP 查詢(目前不支援細粒度設定)
|
||||
- `webfetch` — 擷取 URL(比對 URL)
|
||||
- `websearch`、`codesearch` — 網頁/程式碼搜尋(比對查詢內容)
|
||||
- `websearch` — 網頁搜尋(比對查詢內容)
|
||||
- `external_directory` — 當工具存取專案工作目錄之外的路徑時觸發
|
||||
- `doom_loop` — 當同一工具呼叫以相同輸入重複 3 次時觸發
|
||||
|
||||
|
||||
Reference in New Issue
Block a user