Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e0baa7a
feat: add WarpGrep AI-powered codebase search tool
DhruvBhatia0 Mar 6, 2026
5c623aa
fix: align warpgrep with Morph XML protocol
DhruvBhatia0 Mar 6, 2026
72b2bab
chore: drop warpgrep test changes from branch
DhruvBhatia0 Mar 6, 2026
5c4f320
chore: remove warpgrep test files from branch
DhruvBhatia0 Mar 6, 2026
18c187d
Merge branch 'main' into feat/warpgrep-integration
DhruvBhatia0 Mar 6, 2026
870806b
refactor: replace custom WarpGrep implementation with @morphllm/morphsdk
DhruvBhatia0 Mar 7, 2026
5646d40
feat: rename warpgrep to codebase_search, add error toast for 429/402
DhruvBhatia0 Mar 12, 2026
941efc5
build: bump @morphllm/morphsdk to 0.2.141
DhruvBhatia0 Mar 12, 2026
4d66704
Merge branch 'main' into feat/warpgrep-integration
DhruvBhatia0 Mar 12, 2026
f076350
fix: use Bus.publish for toast, revert global.event subscription
DhruvBhatia0 Mar 13, 2026
2ee083c
feat: add codebase search toggle to experimental settings
DhruvBhatia0 Mar 13, 2026
c28d1ea
build: merge main and resolve bun.lock conflict
DhruvBhatia0 Mar 13, 2026
da98f6e
Merge branch 'main' into feat/warpgrep-integration
chrarnoldus Mar 16, 2026
160c9fc
Update packages/opencode/src/tool/warpgrep.ts
DhruvBhatia0 Mar 16, 2026
08dbb3b
feat: limit codebase_search output to prevent context bloat
DhruvBhatia0 Mar 16, 2026
4adc1f0
build: bump @morphllm/morphsdk to 0.2.148
DhruvBhatia0 Mar 17, 2026
fa8297f
fix: format codebaseSearch i18n strings to respect prettier line width
marius-kilocode Mar 17, 2026
aa2cd8f
fix: only advertise codebase_search in explore prompt when feature fl…
marius-kilocode Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@
"dependencies": {
"@aws-sdk/client-s3": "3.933.0",
"@kilocode/plugin": "workspace:*",
"@opencode-ai/script": "workspace:*",
"@kilocode/sdk": "workspace:*",
"@morphllm/morphsdk": "0.2.141",
"@opencode-ai/script": "workspace:*",
"typescript": "catalog:"
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ const ExperimentalTab: Component = () => {
</Switch>
</SettingsRow>

<SettingsRow
title={language.t("settings.experimental.codebaseSearch.title")}
description={language.t("settings.experimental.codebaseSearch.description")}
>
<Switch
checked={experimental().codebase_search ?? false}
onChange={(checked) => updateExperimental("codebase_search", checked)}
hideLabel
>
{language.t("settings.experimental.codebaseSearch.title")}
</Switch>
</SettingsRow>

<SettingsRow
title={language.t("settings.experimental.continueOnDeny.title")}
description={language.t("settings.experimental.continueOnDeny.description")}
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "عدم تلخيص المحتوى الملصق الكبير",
"settings.experimental.batch.title": "أداة دفعية",
"settings.experimental.batch.description": "تمكين المعالجة الدفعية لاستدعاءات الأدوات",
"settings.experimental.codebaseSearch.title": "بحث في قاعدة الكود",
"settings.experimental.codebaseSearch.description": "تمكين البحث بالذكاء الاصطناعي باللغة الطبيعية عبر قاعدة الكود",
"settings.experimental.continueOnDeny.title": "المتابعة عند الرفض",
"settings.experimental.continueOnDeny.description": "متابعة حلقة الوكيل عند رفض الإذن",
"settings.experimental.mcpTimeout.title": "مهلة MCP (مللي ثانية)",
Expand Down
3 changes: 3 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,9 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Não resumir conteúdo colado grande",
"settings.experimental.batch.title": "Ferramenta em lote",
"settings.experimental.batch.description": "Ativar processamento em lote de chamadas de ferramentas",
"settings.experimental.codebaseSearch.title": "Pesquisa de código",
"settings.experimental.codebaseSearch.description":
"Ativar pesquisa por linguagem natural com IA em toda a base de código",
"settings.experimental.continueOnDeny.title": "Continuar ao negar",
"settings.experimental.continueOnDeny.description": "Continuar o loop do agente quando uma permissão é negada",
"settings.experimental.mcpTimeout.title": "Tempo limite MCP (ms)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/bs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Ne sažimaj veliki zalijepljeni sadržaj",
"settings.experimental.batch.title": "Batch alat",
"settings.experimental.batch.description": "Omogući batch obradu poziva alata",
"settings.experimental.codebaseSearch.title": "Pretraga koda",
"settings.experimental.codebaseSearch.description": "Omogući AI pretragu prirodnim jezikom kroz bazu koda",
"settings.experimental.continueOnDeny.title": "Nastavi pri odbijanju",
"settings.experimental.continueOnDeny.description": "Nastavi petlju agenta kada je dozvola odbijena",
"settings.experimental.mcpTimeout.title": "MCP istek vremena (ms)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Resumér ikke stort indsat indhold",
"settings.experimental.batch.title": "Batchværktøj",
"settings.experimental.batch.description": "Aktiver batchbehandling af flere værktøjskald",
"settings.experimental.codebaseSearch.title": "Kodesøgning",
"settings.experimental.codebaseSearch.description": "Aktiver AI-drevet naturlig sprogsøgning på tværs af kodebasen",
"settings.experimental.continueOnDeny.title": "Fortsæt ved afvisning",
"settings.experimental.continueOnDeny.description": "Fortsæt agentløkken, når en tilladelse afvises",
"settings.experimental.mcpTimeout.title": "MCP-timeout (ms)",
Expand Down
3 changes: 3 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,9 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Große eingefügte Inhalte nicht zusammenfassen",
"settings.experimental.batch.title": "Batch-Werkzeug",
"settings.experimental.batch.description": "Bündelung mehrerer Werkzeugaufrufe aktivieren",
"settings.experimental.codebaseSearch.title": "Codebase-Suche",
"settings.experimental.codebaseSearch.description":
"KI-gestützte Suche in natürlicher Sprache über die gesamte Codebasis aktivieren",
"settings.experimental.continueOnDeny.title": "Bei Ablehnung fortfahren",
"settings.experimental.continueOnDeny.description":
"Agent-Schleife fortsetzen, wenn eine Berechtigung abgelehnt wird",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Don't summarize large pasted content",
"settings.experimental.batch.title": "Batch Tool",
"settings.experimental.batch.description": "Enable batching of multiple tool calls",
"settings.experimental.codebaseSearch.title": "Codebase Search",
"settings.experimental.codebaseSearch.description": "Enable AI-powered natural language search across your codebase",
"settings.experimental.continueOnDeny.title": "Continue on Deny",
"settings.experimental.continueOnDeny.description": "Continue the agent loop when a permission is denied",
"settings.experimental.mcpTimeout.title": "MCP Timeout (ms)",
Expand Down
3 changes: 3 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,9 @@ export const dict = {
"settings.experimental.pasteSummary.description": "No resumir contenido pegado grande",
"settings.experimental.batch.title": "Herramienta por lotes",
"settings.experimental.batch.description": "Habilitar procesamiento por lotes de llamadas a herramientas",
"settings.experimental.codebaseSearch.title": "Búsqueda de código",
"settings.experimental.codebaseSearch.description":
"Habilitar búsqueda por lenguaje natural con IA en toda la base de código",
"settings.experimental.continueOnDeny.title": "Continuar al denegar",
"settings.experimental.continueOnDeny.description": "Continuar el bucle del agente cuando se deniega un permiso",
"settings.experimental.mcpTimeout.title": "Tiempo de espera MCP (ms)",
Expand Down
3 changes: 3 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,9 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Ne pas résumer le contenu collé volumineux",
"settings.experimental.batch.title": "Outil par lot",
"settings.experimental.batch.description": "Activer le traitement par lot d'appels d'outils",
"settings.experimental.codebaseSearch.title": "Recherche de code",
"settings.experimental.codebaseSearch.description":
"Activer la recherche en langage naturel par IA dans toute la base de code",
"settings.experimental.continueOnDeny.title": "Continuer en cas de refus",
"settings.experimental.continueOnDeny.description":
"Continuer la boucle de l'agent lorsqu'une autorisation est refusée",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "大量のペーストコンテンツを要約しない",
"settings.experimental.batch.title": "バッチツール",
"settings.experimental.batch.description": "複数のツール呼び出しのバッチ処理を有効にする",
"settings.experimental.codebaseSearch.title": "コードベース検索",
"settings.experimental.codebaseSearch.description": "コードベース全体でAIによる自然言語検索を有効にする",
"settings.experimental.continueOnDeny.title": "拒否時に続行",
"settings.experimental.continueOnDeny.description": "権限が拒否された場合にエージェントループを続行",
"settings.experimental.mcpTimeout.title": "MCPタイムアウト(ミリ秒)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "대량 붙여넣기 콘텐츠를 요약하지 않음",
"settings.experimental.batch.title": "배치 도구",
"settings.experimental.batch.description": "여러 도구 호출의 배치 처리 활성화",
"settings.experimental.codebaseSearch.title": "코드베이스 검색",
"settings.experimental.codebaseSearch.description": "코드베이스 전체에서 AI 기반 자연어 검색 활성화",
"settings.experimental.continueOnDeny.title": "거부 시 계속",
"settings.experimental.continueOnDeny.description": "권한이 거부되면 에이전트 루프 계속",
"settings.experimental.mcpTimeout.title": "MCP 타임아웃 (ms)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/no.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Ikke oppsummer stort limt innhold",
"settings.experimental.batch.title": "Batchverktøy",
"settings.experimental.batch.description": "Aktiver batchbehandling av verktøykall",
"settings.experimental.codebaseSearch.title": "Kodesøk",
"settings.experimental.codebaseSearch.description": "Aktiver AI-drevet naturlig språksøk på tvers av kodebasen",
"settings.experimental.continueOnDeny.title": "Fortsett ved avvisning",
"settings.experimental.continueOnDeny.description": "Fortsett agentløkken når en tillatelse avvises",
"settings.experimental.mcpTimeout.title": "MCP-tidsavbrudd (ms)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Nie podsumowuj dużego wklejonego tekstu",
"settings.experimental.batch.title": "Narzędzie wsadowe",
"settings.experimental.batch.description": "Włącz przetwarzanie wsadowe wywołań narzędzi",
"settings.experimental.codebaseSearch.title": "Wyszukiwanie kodu",
"settings.experimental.codebaseSearch.description": "Włącz wyszukiwanie w języku naturalnym z AI w całej bazie kodu",
"settings.experimental.continueOnDeny.title": "Kontynuuj przy odmowie",
"settings.experimental.continueOnDeny.description": "Kontynuuj pętlę agenta po odmowie uprawnienia",
"settings.experimental.mcpTimeout.title": "Limit czasu MCP (ms)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "Не суммировать большой вставленный контент",
"settings.experimental.batch.title": "Пакетный инструмент",
"settings.experimental.batch.description": "Включить пакетную обработку вызовов инструментов",
"settings.experimental.codebaseSearch.title": "Поиск по коду",
"settings.experimental.codebaseSearch.description": "Включить поиск на естественном языке с ИИ по всей кодовой базе",
"settings.experimental.continueOnDeny.title": "Продолжить при отказе",
"settings.experimental.continueOnDeny.description": "Продолжить цикл агента при отказе в разрешении",
"settings.experimental.mcpTimeout.title": "Таймаут MCP (мс)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/th.ts
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "ไม่สรุปเนื้อหาที่วางขนาดใหญ่",
"settings.experimental.batch.title": "เครื่องมือแบทช์",
"settings.experimental.batch.description": "เปิดใช้งานการประมวลผลแบทช์ของการเรียกเครื่องมือ",
"settings.experimental.codebaseSearch.title": "ค้นหาโค้ดเบส",
"settings.experimental.codebaseSearch.description": "เปิดใช้งานการค้นหาด้วยภาษาธรรมชาติโดย AI ทั่วทั้งโค้ดเบส",
"settings.experimental.continueOnDeny.title": "ดำเนินต่อเมื่อถูกปฏิเสธ",
"settings.experimental.continueOnDeny.description": "ดำเนินลูปเอเจนต์ต่อเมื่อสิทธิ์ถูกปฏิเสธ",
"settings.experimental.mcpTimeout.title": "หมดเวลา MCP (มิลลิวินาที)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "不对大量粘贴内容进行摘要",
"settings.experimental.batch.title": "批量工具",
"settings.experimental.batch.description": "启用多个工具调用的批处理",
"settings.experimental.codebaseSearch.title": "代码库搜索",
"settings.experimental.codebaseSearch.description": "启用 AI 驱动的自然语言代码库搜索",
"settings.experimental.continueOnDeny.title": "拒绝后继续",
"settings.experimental.continueOnDeny.description": "权限被拒绝时继续智能体循环",
"settings.experimental.mcpTimeout.title": "MCP 超时(毫秒)",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/zht.ts
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,8 @@ export const dict = {
"settings.experimental.pasteSummary.description": "不對大量貼上內容進行摘要",
"settings.experimental.batch.title": "批次工具",
"settings.experimental.batch.description": "啟用多個工具呼叫的批次處理",
"settings.experimental.codebaseSearch.title": "程式碼庫搜尋",
"settings.experimental.codebaseSearch.description": "啟用 AI 驅動的自然語言程式碼庫搜尋",
"settings.experimental.continueOnDeny.title": "拒絕後繼續",
"settings.experimental.continueOnDeny.description": "權限被拒絕時繼續 Agent 迴圈",
"settings.experimental.mcpTimeout.title": "MCP 逾時(毫秒)",
Expand Down
1 change: 1 addition & 0 deletions packages/kilo-vscode/webview-ui/src/types/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ export interface WatcherConfig {
export interface ExperimentalConfig {
disable_paste_summary?: boolean
batch_tool?: boolean
codebase_search?: boolean
primary_tools?: string[]
continue_loop_on_deny?: boolean
mcp_timeout?: number
Expand Down
1 change: 1 addition & 0 deletions packages/opencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@kilocode/plugin": "workspace:*",
"@kilocode/sdk": "workspace:*",
"@modelcontextprotocol/sdk": "1.25.2",
"@morphllm/morphsdk": "0.2.148",
"@octokit/graphql": "9.0.2",
"@octokit/rest": "catalog:",
"@openauthjs/openauth": "catalog:",
Expand Down
9 changes: 8 additions & 1 deletion packages/opencode/src/agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import PROMPT_ASK from "./prompt/ask.txt"
import PROMPT_ORCHESTRATOR from "./prompt/orchestrator.txt"
import PROMPT_SUMMARY from "./prompt/summary.txt"
import PROMPT_TITLE from "./prompt/title.txt"

import { PermissionNext } from "@/permission/next"
import { mergeDeep, pipe, sortBy, values } from "remeda"
import { Global } from "@/global"
Expand Down Expand Up @@ -158,6 +159,7 @@ export namespace Agent {
webfetch: "allow",
websearch: "allow",
codesearch: "allow",
codebase_search: "allow", // kilocode_change
external_directory: {
[Truncate.GLOB]: "allow",
},
Expand Down Expand Up @@ -190,6 +192,7 @@ export namespace Agent {
webfetch: "allow",
websearch: "allow",
codesearch: "allow",
codebase_search: "allow", // kilocode_change
external_directory: {
[Truncate.GLOB]: "allow",
},
Expand Down Expand Up @@ -227,6 +230,7 @@ export namespace Agent {
webfetch: "allow",
websearch: "allow",
codesearch: "allow",
codebase_search: "allow", // kilocode_change
read: "allow",
external_directory: {
"*": "ask",
Expand All @@ -236,7 +240,10 @@ export namespace Agent {
user,
),
description: `Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.`,
prompt: PROMPT_EXPLORE,
// kilocode_change - only advertise codebase_search when the experimental flag is on
prompt: cfg.experimental?.codebase_search
? `Prefer using the codebase_search tool for codebase searches — it performs intelligent multi-step code search and returns the most relevant code spans.\n\n${PROMPT_EXPLORE}`
: PROMPT_EXPLORE,
options: {},
mode: "subagent",
native: true,
Expand Down
1 change: 1 addition & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,7 @@ export namespace Config {
.object({
disable_paste_summary: z.boolean().optional(),
batch_tool: z.boolean().optional().describe("Enable the batch tool"),
codebase_search: z.boolean().optional().describe("Enable AI-powered codebase search"), // kilocode_change

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Regenerate the OpenAPI/SDK artifacts for this new config field

Config.Info backs the /config and /global schemas, so adding experimental.codebase_search here changes the public API. packages/sdk/openapi.json, packages/sdk/js/src/gen/types.gen.ts, and packages/sdk/js/src/v2/gen/types.gen.ts still do not expose this property, which leaves SDK clients unable to type or send the new option.

// kilocode_change start - enable telemetry by default
openTelemetry: z.boolean().default(true).describe("Enable telemetry. Set to false to opt-out."),
// kilocode_change end
Expand Down
2 changes: 2 additions & 0 deletions packages/opencode/src/tool/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import z from "zod"
import { Plugin } from "../plugin"
import { WebSearchTool } from "./websearch"
import { CodeSearchTool } from "./codesearch"
import { CodebaseSearchTool } from "./warpgrep" // kilocode_change
import { Flag } from "@/flag/flag"
import { Log } from "@/util/log"
import { LspTool } from "./lsp"
Expand Down Expand Up @@ -115,6 +116,7 @@ export namespace ToolRegistry {
// TodoReadTool,
WebSearchTool,
CodeSearchTool,
...(config.experimental?.codebase_search === true ? [CodebaseSearchTool] : []), // kilocode_change
SkillTool,
ApplyPatchTool,
...(Flag.KILO_EXPERIMENTAL_LSP_TOOL ? [LspTool] : []),
Expand Down
Loading
Loading