├── .changeset
├── README.md
├── changelog-config.js
└── config.json
├── .dockerignore
├── .env.sample
├── .git-blame-ignore-revs
├── .gitattributes
├── .gitconfig
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ └── config.yml
├── actions
│ └── ai-release-notes
│ │ └── action.yml
├── dependabot.yml
├── pull_request_template.md
├── scripts
│ ├── get_prev_version_refs.py
│ └── overwrite_changeset_changelog.py
└── workflows
│ ├── changeset-release.yml
│ ├── code-qa.yml
│ └── marketplace-publish.yml
├── .gitignore
├── .husky
├── pre-commit
└── pre-push
├── .kilocodemodes
├── .nvmrc
├── .prettierrc.json
├── .roo
├── rules-translate
│ └── 001-general-rules.md
└── rules
│ └── rules.md
├── .rooignore
├── .tool-versions
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── DEVELOPMENT.md
├── LICENSE
├── MONOREPO.md
├── NOTICE
├── PRIVACY.md
├── README.md
├── apps
├── vscode-e2e
│ ├── .env.integration.example
│ ├── .env.local.sample
│ ├── .vscode-test.mjs
│ ├── eslint.config.mjs
│ ├── package.json
│ ├── src
│ │ ├── runTest.ts
│ │ ├── suite
│ │ │ ├── extension.test.ts
│ │ │ ├── index.ts
│ │ │ ├── modes.test.ts
│ │ │ ├── subtasks.test.ts
│ │ │ ├── task.test.ts
│ │ │ └── utils.ts
│ │ └── types
│ │ │ └── global.d.ts
│ ├── tsconfig.esm.json
│ └── tsconfig.json
└── vscode-nightly
│ ├── .gitignore
│ ├── esbuild.mjs
│ ├── package.json
│ ├── package.nightly.json
│ └── package.nls.nightly.json
├── benchmark
└── src
│ ├── runExercise.ts
│ └── utils.ts
├── ellipsis.yaml
├── evals
├── .env.sample
├── .gitignore
├── .npmrc
├── .tool-versions
├── Dockerfile
├── README.md
├── apps
│ ├── cli
│ │ ├── eslint.config.mjs
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── exercises.ts
│ │ │ ├── index.ts
│ │ │ └── paths.ts
│ │ └── tsconfig.json
│ └── web
│ │ ├── components.json
│ │ ├── eslint.config.mjs
│ │ ├── next.config.ts
│ │ ├── package.json
│ │ ├── postcss.config.mjs
│ │ ├── public
│ │ └── .gitkeep
│ │ ├── src
│ │ ├── app
│ │ │ ├── api
│ │ │ │ ├── runs
│ │ │ │ │ ├── [id]
│ │ │ │ │ │ └── stream
│ │ │ │ │ │ │ └── route.ts
│ │ │ │ │ └── route.ts
│ │ │ │ └── tasks
│ │ │ │ │ └── route.ts
│ │ │ ├── favicon.ico
│ │ │ ├── globals.css
│ │ │ ├── home.tsx
│ │ │ ├── layout.tsx
│ │ │ ├── page.tsx
│ │ │ └── runs
│ │ │ │ ├── [id]
│ │ │ │ ├── connection-status.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ ├── run.tsx
│ │ │ │ └── task-status.tsx
│ │ │ │ └── new
│ │ │ │ ├── new-run.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ └── settings-diff.tsx
│ │ ├── components
│ │ │ ├── layout
│ │ │ │ ├── header.tsx
│ │ │ │ └── logo.tsx
│ │ │ ├── providers
│ │ │ │ ├── index.ts
│ │ │ │ ├── react-query-provider.tsx
│ │ │ │ └── theme-provider.tsx
│ │ │ └── ui
│ │ │ │ ├── alert-dialog.tsx
│ │ │ │ ├── badge.tsx
│ │ │ │ ├── button.tsx
│ │ │ │ ├── command.tsx
│ │ │ │ ├── dialog.tsx
│ │ │ │ ├── drawer.tsx
│ │ │ │ ├── dropdown-menu.tsx
│ │ │ │ ├── form.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── input.tsx
│ │ │ │ ├── label.tsx
│ │ │ │ ├── multi-select.tsx
│ │ │ │ ├── popover.tsx
│ │ │ │ ├── scroll-area.tsx
│ │ │ │ ├── select.tsx
│ │ │ │ ├── separator.tsx
│ │ │ │ ├── slider.tsx
│ │ │ │ ├── sonner.tsx
│ │ │ │ ├── table.tsx
│ │ │ │ ├── tabs.tsx
│ │ │ │ ├── textarea.tsx
│ │ │ │ └── tooltip.tsx
│ │ ├── hooks
│ │ │ ├── use-event-source.ts
│ │ │ ├── use-exercises.ts
│ │ │ ├── use-open-router-models.ts
│ │ │ ├── use-process-tree.ts
│ │ │ └── use-run-status.ts
│ │ └── lib
│ │ │ ├── formatters.ts
│ │ │ ├── schemas.ts
│ │ │ ├── server
│ │ │ ├── exercises.ts
│ │ │ ├── processes.ts
│ │ │ ├── runs.ts
│ │ │ ├── sse-stream.ts
│ │ │ └── tasks.ts
│ │ │ └── utils.ts
│ │ └── tsconfig.json
├── config
│ ├── eslint
│ │ ├── base.js
│ │ ├── next.js
│ │ └── package.json
│ └── typescript
│ │ ├── base.json
│ │ ├── cjs.json
│ │ ├── nextjs.json
│ │ └── package.json
├── package.json
├── packages
│ ├── db
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── drizzle.config.ts
│ │ ├── drizzle
│ │ │ ├── 0000_elite_raza.sql
│ │ │ ├── 0001_lush_reavers.sql
│ │ │ ├── 0002_white_flatman.sql
│ │ │ ├── 0003_sweet_chimera.sql
│ │ │ ├── 0004_absent_slapstick.sql
│ │ │ └── meta
│ │ │ │ ├── 0000_snapshot.json
│ │ │ │ ├── 0001_snapshot.json
│ │ │ │ ├── 0002_snapshot.json
│ │ │ │ ├── 0003_snapshot.json
│ │ │ │ ├── 0004_snapshot.json
│ │ │ │ └── _journal.json
│ │ ├── eslint.config.mjs
│ │ ├── package.json
│ │ ├── scripts
│ │ │ ├── copy-run.mts
│ │ │ └── enable-wal.mts
│ │ ├── src
│ │ │ ├── db.ts
│ │ │ ├── index.ts
│ │ │ ├── queries
│ │ │ │ ├── __tests__
│ │ │ │ │ └── runs.test.ts
│ │ │ │ ├── errors.ts
│ │ │ │ ├── runs.ts
│ │ │ │ ├── taskMetrics.ts
│ │ │ │ ├── tasks.ts
│ │ │ │ └── toolErrors.ts
│ │ │ └── schema.ts
│ │ ├── tsconfig.json
│ │ ├── vitest.config.ts
│ │ └── vitest.setup.ts
│ ├── ipc
│ │ ├── eslint.config.mjs
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── client.ts
│ │ │ ├── index.ts
│ │ │ └── server.ts
│ │ └── tsconfig.json
│ ├── lib
│ │ ├── eslint.config.mjs
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── __tests__
│ │ │ │ └── in-chunks-of.test.ts
│ │ │ ├── in-chunks-of.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ └── types
│ │ ├── eslint.config.mjs
│ │ ├── package.json
│ │ ├── src
│ │ ├── exercises.ts
│ │ ├── index.ts
│ │ ├── ipc.ts
│ │ ├── roo-code-defaults.ts
│ │ ├── roo-code.ts
│ │ └── utils.ts
│ │ └── tsconfig.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── scripts
│ └── setup.sh
└── turbo.json
├── flake.nix
├── kilo.gif
├── knip.json
├── package.json
├── packages
├── build
│ ├── eslint.config.mjs
│ ├── package.json
│ ├── src
│ │ ├── __tests__
│ │ │ └── index.test.ts
│ │ ├── esbuild.ts
│ │ ├── git.ts
│ │ ├── index.ts
│ │ └── types.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
├── cloud
│ ├── eslint.config.mjs
│ ├── package.json
│ ├── src
│ │ ├── AuthService.ts
│ │ ├── CloudService.ts
│ │ ├── Config.ts
│ │ ├── RefreshTimer.ts
│ │ ├── SettingsService.ts
│ │ ├── TelemetryClient.ts
│ │ ├── __mocks__
│ │ │ └── vscode.ts
│ │ ├── __tests__
│ │ │ ├── CloudService.test.ts
│ │ │ ├── RefreshTimer.test.ts
│ │ │ └── TelemetryClient.test.ts
│ │ ├── index.ts
│ │ └── types.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
├── config-eslint
│ ├── base.js
│ ├── next.js
│ ├── package.json
│ └── react.js
├── config-typescript
│ ├── base.json
│ ├── cjs.json
│ ├── nextjs.json
│ ├── package.json
│ └── vscode-library.json
├── telemetry
│ ├── eslint.config.mjs
│ ├── package.json
│ ├── src
│ │ ├── BaseTelemetryClient.ts
│ │ ├── PostHogTelemetryClient.ts
│ │ ├── TelemetryService.ts
│ │ ├── __tests__
│ │ │ └── PostHogTelemetryClient.test.ts
│ │ └── index.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
└── types
│ ├── eslint.config.mjs
│ ├── npm
│ └── package.json
│ ├── package.json
│ ├── src
│ ├── __tests__
│ │ └── index.test.ts
│ ├── api.ts
│ ├── cloud.ts
│ ├── codebase-index.ts
│ ├── experiment.ts
│ ├── global-settings.ts
│ ├── history.ts
│ ├── index.ts
│ ├── ipc.ts
│ ├── message.ts
│ ├── mode.ts
│ ├── model.ts
│ ├── provider-settings.ts
│ ├── providers
│ │ ├── anthropic.ts
│ │ ├── bedrock.ts
│ │ ├── chutes.ts
│ │ ├── deepseek.ts
│ │ ├── gemini.ts
│ │ ├── glama.ts
│ │ ├── groq.ts
│ │ ├── index.ts
│ │ ├── lite-llm.ts
│ │ ├── lm-studio.ts
│ │ ├── mistral.ts
│ │ ├── openai.ts
│ │ ├── openrouter.ts
│ │ ├── requesty.ts
│ │ ├── unbound.ts
│ │ ├── vertex.ts
│ │ ├── vscode-llm.ts
│ │ └── xai.ts
│ ├── telemetry.ts
│ ├── terminal.ts
│ ├── tool.ts
│ ├── type-fu.ts
│ └── vscode.ts
│ ├── tsconfig.json
│ ├── tsup.config.ts
│ └── vitest.config.ts
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── renovate.json
├── scripts
├── bootstrap.mjs
├── find-missing-i18n-key.js
├── find-missing-translations.js
└── reset-kilocode-state.sh
├── src
├── .gitignore
├── .prettierignore
├── .vscodeignore
├── __mocks__
│ ├── @modelcontextprotocol
│ │ └── sdk
│ │ │ ├── client
│ │ │ ├── index.js
│ │ │ ├── sse.js
│ │ │ ├── stdio.js
│ │ │ └── streamableHttp.js
│ │ │ ├── index.js
│ │ │ └── types.js
│ ├── McpHub.ts
│ ├── default-shell.js
│ ├── delay.js
│ ├── execa.js
│ ├── fs
│ │ └── promises.ts
│ ├── get-folder-size.js
│ ├── jest.setup.ts
│ ├── os-name.js
│ ├── p-limit.js
│ ├── p-wait-for.js
│ ├── serialize-error.js
│ ├── services
│ │ └── ripgrep
│ │ │ └── index.ts
│ ├── strip-ansi.js
│ ├── strip-bom.js
│ └── vscode.js
├── __tests__
│ ├── dist_assets.test.ts
│ └── migrateSettings.test.ts
├── activate
│ ├── CodeActionProvider.ts
│ ├── __tests__
│ │ ├── CodeActionProvider.test.ts
│ │ └── registerCommands.test.ts
│ ├── handleTask.ts
│ ├── handleUri.ts
│ ├── humanRelay.ts
│ ├── index.ts
│ ├── registerCodeActions.ts
│ ├── registerCommands.ts
│ └── registerTerminalActions.ts
├── api
│ ├── index.ts
│ ├── providers
│ │ ├── __tests__
│ │ │ ├── anthropic-vertex.test.ts
│ │ │ ├── anthropic.test.ts
│ │ │ ├── bedrock-custom-arn.test.ts
│ │ │ ├── bedrock-invokedModelId.test.ts
│ │ │ ├── bedrock-vpc-endpoint.test.ts
│ │ │ ├── bedrock.test.ts
│ │ │ ├── chutes.test.ts
│ │ │ ├── deepseek.test.ts
│ │ │ ├── fireworks.test.ts
│ │ │ ├── gemini.test.ts
│ │ │ ├── glama.test.ts
│ │ │ ├── groq.test.ts
│ │ │ ├── lmstudio.test.ts
│ │ │ ├── mistral.test.ts
│ │ │ ├── ollama.spec.ts
│ │ │ ├── openai-native.spec.ts
│ │ │ ├── openai-usage-tracking.spec.ts
│ │ │ ├── openai.spec.ts
│ │ │ ├── openrouter.test.ts
│ │ │ ├── requesty.test.ts
│ │ │ ├── unbound.test.ts
│ │ │ ├── vertex.test.ts
│ │ │ ├── vscode-lm.test.ts
│ │ │ └── xai.test.ts
│ │ ├── anthropic-vertex.ts
│ │ ├── anthropic.ts
│ │ ├── base-openai-compatible-provider.ts
│ │ ├── base-provider.ts
│ │ ├── bedrock.ts
│ │ ├── chutes.ts
│ │ ├── constants.ts
│ │ ├── deepseek.ts
│ │ ├── fake-ai.ts
│ │ ├── fetchers
│ │ │ ├── __tests__
│ │ │ │ ├── fixtures
│ │ │ │ │ ├── openrouter-model-endpoints.json
│ │ │ │ │ └── openrouter-models.json
│ │ │ │ ├── litellm.test.ts
│ │ │ │ ├── modelCache.test.ts
│ │ │ │ └── openrouter.spec.ts
│ │ │ ├── glama.ts
│ │ │ ├── litellm.ts
│ │ │ ├── modelCache.ts
│ │ │ ├── modelEndpointCache.ts
│ │ │ ├── openrouter.ts
│ │ │ ├── requesty.ts
│ │ │ └── unbound.ts
│ │ ├── fireworks.ts
│ │ ├── gemini.ts
│ │ ├── glama.ts
│ │ ├── groq.ts
│ │ ├── human-relay.ts
│ │ ├── index.ts
│ │ ├── kilocode-openrouter.ts
│ │ ├── lite-llm.ts
│ │ ├── lm-studio.ts
│ │ ├── mistral.ts
│ │ ├── ollama.ts
│ │ ├── openai-native.ts
│ │ ├── openai.ts
│ │ ├── openrouter.ts
│ │ ├── requesty.ts
│ │ ├── router-provider.ts
│ │ ├── unbound.ts
│ │ ├── vertex.ts
│ │ ├── vscode-lm.ts
│ │ └── xai.ts
│ └── transform
│ │ ├── __tests__
│ │ ├── bedrock-converse-format.test.ts
│ │ ├── gemini-format.test.ts
│ │ ├── image-cleaning.test.ts
│ │ ├── mistral-format.test.ts
│ │ ├── model-params.test.ts
│ │ ├── openai-format.test.ts
│ │ ├── r1-format.test.ts
│ │ ├── reasoning.test.ts
│ │ ├── simple-format.test.ts
│ │ ├── stream.test.ts
│ │ └── vscode-lm-format.test.ts
│ │ ├── bedrock-converse-format.ts
│ │ ├── cache-strategy
│ │ ├── __tests__
│ │ │ └── cache-strategy.test.ts
│ │ ├── base-strategy.ts
│ │ ├── multi-point-strategy.ts
│ │ └── types.ts
│ │ ├── caching
│ │ ├── __tests__
│ │ │ ├── anthropic.test.ts
│ │ │ ├── gemini.test.ts
│ │ │ └── vertex.test.ts
│ │ ├── anthropic.ts
│ │ ├── gemini.ts
│ │ └── vertex.ts
│ │ ├── gemini-format.ts
│ │ ├── image-cleaning.ts
│ │ ├── mistral-format.ts
│ │ ├── model-params.ts
│ │ ├── openai-format.ts
│ │ ├── r1-format.ts
│ │ ├── reasoning.ts
│ │ ├── simple-format.ts
│ │ ├── stream.ts
│ │ └── vscode-lm-format.ts
├── assets
│ ├── codicons
│ │ ├── codicon.css
│ │ └── codicon.ttf
│ ├── docs
│ │ └── demo.gif
│ ├── icons
│ │ ├── icon.png
│ │ ├── kilo.png
│ │ └── logo-outline-black.png
│ └── images
│ │ ├── openrouter.png
│ │ └── requesty.png
├── core
│ ├── __mocks__
│ │ └── mock-setup.ts
│ ├── assistant-message
│ │ ├── __tests__
│ │ │ ├── parseAssistantMessage.test.ts
│ │ │ └── parseAssistantMessageBenchmark.ts
│ │ ├── index.ts
│ │ ├── parseAssistantMessage.ts
│ │ ├── parseAssistantMessageV2.ts
│ │ └── presentAssistantMessage.ts
│ ├── checkpoints
│ │ └── index.ts
│ ├── condense
│ │ ├── __tests__
│ │ │ └── index.test.ts
│ │ └── index.ts
│ ├── config
│ │ ├── ContextProxy.ts
│ │ ├── CustomModesManager.ts
│ │ ├── ProviderSettingsManager.ts
│ │ ├── __tests__
│ │ │ ├── ContextProxy.test.ts
│ │ │ ├── CustomModesManager.test.ts
│ │ │ ├── CustomModesSettings.test.ts
│ │ │ ├── ModeConfig.test.ts
│ │ │ ├── ProviderSettingsManager.test.ts
│ │ │ └── importExport.test.ts
│ │ └── importExport.ts
│ ├── context-tracking
│ │ ├── FileContextTracker.ts
│ │ └── FileContextTrackerTypes.ts
│ ├── context
│ │ └── instructions
│ │ │ ├── kilo-rules.ts
│ │ │ ├── rule-helpers.ts
│ │ │ └── workflows.ts
│ ├── diff
│ │ ├── insert-groups.ts
│ │ └── strategies
│ │ │ ├── __tests__
│ │ │ └── multi-search-replace.test.ts
│ │ │ └── multi-search-replace.ts
│ ├── environment
│ │ ├── __tests__
│ │ │ └── getEnvironmentDetails.test.ts
│ │ └── getEnvironmentDetails.ts
│ ├── ignore
│ │ ├── RooIgnoreController.ts
│ │ ├── __mocks__
│ │ │ └── RooIgnoreController.ts
│ │ └── __tests__
│ │ │ ├── RooIgnoreController.security.test.ts
│ │ │ └── RooIgnoreController.test.ts
│ ├── mentions
│ │ ├── __tests__
│ │ │ └── index.test.ts
│ │ ├── index.ts
│ │ ├── processKiloUserContentMentions.ts
│ │ └── processUserContentMentions.ts
│ ├── prompts
│ │ ├── __tests__
│ │ │ ├── __snapshots__
│ │ │ │ └── system.test.ts.snap
│ │ │ ├── custom-system-prompt.test.ts
│ │ │ ├── responses-rooignore.test.ts
│ │ │ ├── sections.test.ts
│ │ │ ├── system.test.ts
│ │ │ └── utils.ts
│ │ ├── commands.ts
│ │ ├── instructions
│ │ │ ├── create-mcp-server.ts
│ │ │ ├── create-mode.ts
│ │ │ └── instructions.ts
│ │ ├── responses.ts
│ │ ├── sections
│ │ │ ├── __tests__
│ │ │ │ ├── custom-instructions.test.ts
│ │ │ │ └── custom-system-prompt.test.ts
│ │ │ ├── capabilities.ts
│ │ │ ├── custom-instructions.ts
│ │ │ ├── custom-system-prompt.ts
│ │ │ ├── index.ts
│ │ │ ├── markdown-formatting.ts
│ │ │ ├── mcp-servers.ts
│ │ │ ├── modes.ts
│ │ │ ├── objective.ts
│ │ │ ├── rules.ts
│ │ │ ├── system-info.ts
│ │ │ ├── tool-use-guidelines.ts
│ │ │ └── tool-use.ts
│ │ ├── system.ts
│ │ └── tools
│ │ │ ├── access-mcp-resource.ts
│ │ │ ├── ask-followup-question.ts
│ │ │ ├── attempt-completion.ts
│ │ │ ├── browser-action.ts
│ │ │ ├── codebase-search.ts
│ │ │ ├── execute-command.ts
│ │ │ ├── fetch-instructions.ts
│ │ │ ├── index.ts
│ │ │ ├── insert-content.ts
│ │ │ ├── list-code-definition-names.ts
│ │ │ ├── list-files.ts
│ │ │ ├── new-task.ts
│ │ │ ├── read-file.ts
│ │ │ ├── search-and-replace.ts
│ │ │ ├── search-files.ts
│ │ │ ├── switch-mode.ts
│ │ │ ├── types.ts
│ │ │ ├── use-mcp-tool.ts
│ │ │ └── write-to-file.ts
│ ├── slash-commands
│ │ ├── index.ts
│ │ └── kilo.ts
│ ├── sliding-window
│ │ ├── __tests__
│ │ │ └── sliding-window.test.ts
│ │ └── index.ts
│ ├── task-persistence
│ │ ├── apiMessages.ts
│ │ ├── index.ts
│ │ ├── taskMessages.ts
│ │ └── taskMetadata.ts
│ ├── task
│ │ ├── Task.ts
│ │ └── __tests__
│ │ │ └── Task.test.ts
│ ├── tools
│ │ ├── ToolRepetitionDetector.ts
│ │ ├── __tests__
│ │ │ ├── ToolRepetitionDetector.test.ts
│ │ │ ├── executeCommandTool.test.ts
│ │ │ ├── readFileTool.test.ts
│ │ │ ├── validateToolUse.test.ts
│ │ │ └── writeToFileTool.test.ts
│ │ ├── accessMcpResourceTool.ts
│ │ ├── applyDiffTool.ts
│ │ ├── askFollowupQuestionTool.ts
│ │ ├── attemptCompletionTool.ts
│ │ ├── browserActionTool.ts
│ │ ├── codebaseSearchTool.ts
│ │ ├── condenseTool.ts
│ │ ├── executeCommandTool.ts
│ │ ├── fetchInstructionsTool.ts
│ │ ├── insertContentTool.ts
│ │ ├── listCodeDefinitionNamesTool.ts
│ │ ├── listFilesTool.ts
│ │ ├── newRuleTool.ts
│ │ ├── newTaskTool.ts
│ │ ├── readFileTool.ts
│ │ ├── reportBugTool.ts
│ │ ├── searchAndReplaceTool.ts
│ │ ├── searchFilesTool.ts
│ │ ├── switchModeTool.ts
│ │ ├── useMcpToolTool.ts
│ │ ├── validateToolUse.ts
│ │ └── writeToFileTool.ts
│ └── webview
│ │ ├── ClineProvider.ts
│ │ ├── __tests__
│ │ ├── ClineProvider.test.ts
│ │ └── webviewMessageHandler.test.ts
│ │ ├── generateSystemPrompt.ts
│ │ ├── getNonce.ts
│ │ ├── getUri.ts
│ │ └── webviewMessageHandler.ts
├── esbuild.mjs
├── eslint.config.mjs
├── exports
│ ├── roo-code.d.ts
│ └── types.ts
├── extension.ts
├── extension
│ ├── api.ts
│ └── ipc-server.ts
├── i18n
│ ├── index.ts
│ ├── locales
│ │ ├── ca
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── de
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── en
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── es
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── fr
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── hi
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── id
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── it
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── ja
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── ko
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── nl
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── pl
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── pt-BR
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── ru
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── tr
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── vi
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ ├── zh-CN
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ │ └── zh-TW
│ │ │ ├── common.json
│ │ │ ├── kilocode.json
│ │ │ └── tools.json
│ └── setup.ts
├── integrations
│ ├── diagnostics
│ │ ├── __tests__
│ │ │ └── diagnostics.test.ts
│ │ └── index.ts
│ ├── editor
│ │ ├── DecorationController.ts
│ │ ├── DiffViewProvider.ts
│ │ ├── EditorUtils.ts
│ │ ├── __tests__
│ │ │ ├── DiffViewProvider.test.ts
│ │ │ ├── EditorUtils.test.ts
│ │ │ └── detect-omission.test.ts
│ │ └── detect-omission.ts
│ ├── misc
│ │ ├── __tests__
│ │ │ ├── extract-text.test.ts
│ │ │ ├── line-counter.test.ts
│ │ │ ├── performance
│ │ │ │ └── processCarriageReturns.benchmark.ts
│ │ │ ├── read-file-tool.test.ts
│ │ │ └── read-lines.test.ts
│ │ ├── export-markdown.ts
│ │ ├── extract-text.ts
│ │ ├── line-counter.ts
│ │ ├── open-file.ts
│ │ ├── process-images.ts
│ │ └── read-lines.ts
│ ├── notifications
│ │ └── index.ts
│ ├── terminal
│ │ ├── BaseTerminal.ts
│ │ ├── BaseTerminalProcess.ts
│ │ ├── ExecaTerminal.ts
│ │ ├── ExecaTerminalProcess.ts
│ │ ├── README.md
│ │ ├── ShellIntegrationManager.ts
│ │ ├── Terminal.ts
│ │ ├── TerminalProcess.ts
│ │ ├── TerminalRegistry.ts
│ │ ├── __tests__
│ │ │ ├── ExecaTerminal.spec.ts
│ │ │ ├── ExecaTerminalProcess.spec.ts
│ │ │ ├── TerminalProcess.test.ts
│ │ │ ├── TerminalProcessExec.bash.test.ts
│ │ │ ├── TerminalProcessExec.cmd.test.ts
│ │ │ ├── TerminalProcessExec.common.ts
│ │ │ ├── TerminalProcessExec.pwsh.test.ts
│ │ │ ├── TerminalProcessInterpretExitCode.test.ts
│ │ │ ├── TerminalRegistry.test.ts
│ │ │ ├── setupTerminalTests.ts
│ │ │ └── streamUtils
│ │ │ │ ├── bashStream.ts
│ │ │ │ ├── cmdStream.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── mockStream.ts
│ │ │ │ └── pwshStream.ts
│ │ ├── mergePromise.ts
│ │ └── types.ts
│ ├── theme
│ │ ├── default-themes
│ │ │ ├── dark_modern.json
│ │ │ ├── dark_plus.json
│ │ │ ├── dark_vs.json
│ │ │ ├── hc_black.json
│ │ │ ├── hc_light.json
│ │ │ ├── light_modern.json
│ │ │ ├── light_plus.json
│ │ │ └── light_vs.json
│ │ └── getTheme.ts
│ └── workspace
│ │ ├── WorkspaceTracker.ts
│ │ └── __tests__
│ │ └── WorkspaceTracker.test.ts
├── jest.config.mjs
├── package.json
├── package.nls.ca.json
├── package.nls.de.json
├── package.nls.es.json
├── package.nls.fr.json
├── package.nls.hi.json
├── package.nls.id.json
├── package.nls.it.json
├── package.nls.ja.json
├── package.nls.json
├── package.nls.ko.json
├── package.nls.nl.json
├── package.nls.pl.json
├── package.nls.pt-BR.json
├── package.nls.ru.json
├── package.nls.tr.json
├── package.nls.vi.json
├── package.nls.zh-CN.json
├── package.nls.zh-TW.json
├── services
│ ├── autocomplete
│ │ ├── AutocompleteDecorationAnimation.ts
│ │ ├── AutocompleteLanguageInfo.ts
│ │ ├── AutocompleteProvider.ts
│ │ ├── ContextGatherer.ts
│ │ ├── __tests__
│ │ │ ├── AutocompleteProvider.test.ts
│ │ │ ├── ContextGatherer.test.ts
│ │ │ ├── EditDetectionUtils.test.ts
│ │ │ ├── PromptRenderer.test.ts.ignore
│ │ │ └── fixtures
│ │ │ │ └── contextGatherer
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_module.py
│ │ │ │ ├── file1.go
│ │ │ │ ├── file1.php
│ │ │ │ ├── python
│ │ │ │ ├── classes.py
│ │ │ │ └── functions.py
│ │ │ │ └── typescript
│ │ │ │ ├── arrowFunctions.ts
│ │ │ │ ├── classMethods.ts
│ │ │ │ ├── classes.ts
│ │ │ │ ├── functions.ts
│ │ │ │ └── generators.ts
│ │ ├── context
│ │ │ ├── ContextRetrievalService.ts
│ │ │ ├── ImportDefinitionsService.ts
│ │ │ └── snippetProvider.ts
│ │ ├── ide-types.d.ts
│ │ ├── templating
│ │ │ ├── AutocompleteTemplate.ts
│ │ │ ├── constructPrefixSuffix.ts
│ │ │ ├── getStopTokens.ts
│ │ │ ├── ranges.ts
│ │ │ ├── snippetTypes.ts
│ │ │ └── uri.ts
│ │ ├── types.ts
│ │ └── utils
│ │ │ ├── EditDetectionUtils.ts
│ │ │ ├── HelperVars.ts
│ │ │ ├── LruCache.test.ts
│ │ │ ├── LruCache.ts
│ │ │ ├── ast.ts
│ │ │ ├── createDebouncedFn.ts
│ │ │ ├── document.ts
│ │ │ ├── ide.ts
│ │ │ └── treeSitter.ts
│ ├── browser
│ │ ├── BrowserSession.ts
│ │ ├── UrlContentFetcher.ts
│ │ └── browserDiscovery.ts
│ ├── checkpoints
│ │ ├── RepoPerTaskCheckpointService.ts
│ │ ├── ShadowCheckpointService.ts
│ │ ├── __tests__
│ │ │ ├── ShadowCheckpointService.test.ts
│ │ │ └── excludes.test.ts
│ │ ├── constants.ts
│ │ ├── excludes.ts
│ │ ├── index.ts
│ │ └── types.ts
│ ├── code-index
│ │ ├── __tests__
│ │ │ ├── cache-manager.test.ts
│ │ │ ├── config-manager.test.ts
│ │ │ ├── manager.test.ts
│ │ │ └── service-factory.test.ts
│ │ ├── cache-manager.ts
│ │ ├── config-manager.ts
│ │ ├── constants
│ │ │ └── index.ts
│ │ ├── embedders
│ │ │ ├── ollama.ts
│ │ │ └── openai.ts
│ │ ├── interfaces
│ │ │ ├── cache.ts
│ │ │ ├── config.ts
│ │ │ ├── embedder.ts
│ │ │ ├── file-processor.ts
│ │ │ ├── index.ts
│ │ │ ├── manager.ts
│ │ │ └── vector-store.ts
│ │ ├── manager.ts
│ │ ├── orchestrator.ts
│ │ ├── processors
│ │ │ ├── __tests__
│ │ │ │ ├── file-watcher.test.ts
│ │ │ │ ├── parser.test.ts
│ │ │ │ └── scanner.test.ts
│ │ │ ├── file-watcher.ts
│ │ │ ├── index.ts
│ │ │ ├── parser.ts
│ │ │ └── scanner.ts
│ │ ├── search-service.ts
│ │ ├── service-factory.ts
│ │ ├── shared
│ │ │ ├── get-relative-path.ts
│ │ │ └── supported-extensions.ts
│ │ ├── state-manager.ts
│ │ └── vector-store
│ │ │ ├── __tests__
│ │ │ └── qdrant-client.test.ts
│ │ │ └── qdrant-client.ts
│ ├── glob
│ │ ├── __mocks__
│ │ │ └── list-files.ts
│ │ └── list-files.ts
│ ├── mcp
│ │ ├── McpHub.ts
│ │ ├── McpServerManager.ts
│ │ └── __tests__
│ │ │ └── McpHub.test.ts
│ ├── ripgrep
│ │ ├── __tests__
│ │ │ └── index.test.ts
│ │ └── index.ts
│ ├── search
│ │ └── file-search.ts
│ └── tree-sitter
│ │ ├── __tests__
│ │ ├── fixtures
│ │ │ ├── sample-c-sharp.ts
│ │ │ ├── sample-c.ts
│ │ │ ├── sample-cpp.ts
│ │ │ ├── sample-css.ts
│ │ │ ├── sample-elisp.ts
│ │ │ ├── sample-elixir.ts
│ │ │ ├── sample-embedded_template.ts
│ │ │ ├── sample-go.ts
│ │ │ ├── sample-html.ts
│ │ │ ├── sample-java.ts
│ │ │ ├── sample-javascript.ts
│ │ │ ├── sample-json.ts
│ │ │ ├── sample-kotlin.ts
│ │ │ ├── sample-lua.ts
│ │ │ ├── sample-ocaml.ts
│ │ │ ├── sample-php.ts
│ │ │ ├── sample-python.ts
│ │ │ ├── sample-ruby.ts
│ │ │ ├── sample-rust.ts
│ │ │ ├── sample-scala.ts
│ │ │ ├── sample-solidity.ts
│ │ │ ├── sample-swift.ts
│ │ │ ├── sample-systemrdl.ts
│ │ │ ├── sample-tlaplus.ts
│ │ │ ├── sample-toml.ts
│ │ │ ├── sample-tsx.ts
│ │ │ ├── sample-typescript.ts
│ │ │ ├── sample-vue.ts
│ │ │ └── sample-zig.ts
│ │ ├── helpers.ts
│ │ ├── index.test.ts
│ │ ├── inspectC.test.ts
│ │ ├── inspectCSS.test.ts
│ │ ├── inspectCSharp.test.ts
│ │ ├── inspectCpp.test.ts
│ │ ├── inspectElisp.test.ts
│ │ ├── inspectElixir.test.ts
│ │ ├── inspectEmbeddedTemplate.test.ts
│ │ ├── inspectGo.test.ts
│ │ ├── inspectHtml.test.ts
│ │ ├── inspectJava.test.ts
│ │ ├── inspectJavaScript.test.ts
│ │ ├── inspectJson.test.ts
│ │ ├── inspectKotlin.test.ts
│ │ ├── inspectLua.test.ts
│ │ ├── inspectOCaml.test.ts
│ │ ├── inspectPhp.test.ts
│ │ ├── inspectPython.test.ts
│ │ ├── inspectRuby.test.ts
│ │ ├── inspectRust.test.ts
│ │ ├── inspectScala.test.ts
│ │ ├── inspectSolidity.test.ts
│ │ ├── inspectSwift.test.ts
│ │ ├── inspectSystemRDL.test.ts
│ │ ├── inspectTLAPlus.test.ts
│ │ ├── inspectTOML.test.ts
│ │ ├── inspectTsx.test.ts
│ │ ├── inspectTypeScript.test.ts
│ │ ├── inspectVue.test.ts
│ │ ├── inspectZig.test.ts
│ │ ├── languageParser.test.ts
│ │ ├── markdownIntegration.test.ts
│ │ ├── markdownParser.test.ts
│ │ ├── parseSourceCodeDefinitions.c-sharp.test.ts
│ │ ├── parseSourceCodeDefinitions.c.test.ts
│ │ ├── parseSourceCodeDefinitions.cpp.test.ts
│ │ ├── parseSourceCodeDefinitions.css.test.ts
│ │ ├── parseSourceCodeDefinitions.elisp.test.ts
│ │ ├── parseSourceCodeDefinitions.elixir.test.ts
│ │ ├── parseSourceCodeDefinitions.embedded_template.test.ts
│ │ ├── parseSourceCodeDefinitions.go.test.ts
│ │ ├── parseSourceCodeDefinitions.html.test.ts
│ │ ├── parseSourceCodeDefinitions.java.test.ts
│ │ ├── parseSourceCodeDefinitions.javascript.test.ts
│ │ ├── parseSourceCodeDefinitions.json.test.ts
│ │ ├── parseSourceCodeDefinitions.kotlin.test.ts
│ │ ├── parseSourceCodeDefinitions.lua.test.ts
│ │ ├── parseSourceCodeDefinitions.ocaml.test.ts
│ │ ├── parseSourceCodeDefinitions.php.test.ts
│ │ ├── parseSourceCodeDefinitions.python.test.ts
│ │ ├── parseSourceCodeDefinitions.ruby.test.ts
│ │ ├── parseSourceCodeDefinitions.rust.test.ts
│ │ ├── parseSourceCodeDefinitions.scala.test.ts
│ │ ├── parseSourceCodeDefinitions.solidity.test.ts
│ │ ├── parseSourceCodeDefinitions.swift.test.ts
│ │ ├── parseSourceCodeDefinitions.systemrdl.test.ts
│ │ ├── parseSourceCodeDefinitions.tlaplus.test.ts
│ │ ├── parseSourceCodeDefinitions.toml.test.ts
│ │ ├── parseSourceCodeDefinitions.tsx.test.ts
│ │ ├── parseSourceCodeDefinitions.typescript.test.ts
│ │ ├── parseSourceCodeDefinitions.vue.test.ts
│ │ └── parseSourceCodeDefinitions.zig.test.ts
│ │ ├── index.ts
│ │ ├── languageParser.ts
│ │ ├── markdownParser.ts
│ │ └── queries
│ │ ├── c-sharp.ts
│ │ ├── c.ts
│ │ ├── cpp.ts
│ │ ├── css.ts
│ │ ├── elisp.ts
│ │ ├── elixir.ts
│ │ ├── embedded_template.ts
│ │ ├── go.ts
│ │ ├── html.ts
│ │ ├── index.ts
│ │ ├── java.ts
│ │ ├── javascript.ts
│ │ ├── kotlin.ts
│ │ ├── lua.ts
│ │ ├── ocaml.ts
│ │ ├── php.ts
│ │ ├── python.ts
│ │ ├── ruby.ts
│ │ ├── rust.ts
│ │ ├── scala.ts
│ │ ├── solidity.ts
│ │ ├── swift.ts
│ │ ├── systemrdl.ts
│ │ ├── tlaplus.ts
│ │ ├── toml.ts
│ │ ├── tsx.ts
│ │ ├── typescript.ts
│ │ ├── vue.ts
│ │ └── zig.ts
├── shared
│ ├── ExtensionMessage.ts
│ ├── ProfileValidator.ts
│ ├── TelemetrySetting.ts
│ ├── WebviewMessage.ts
│ ├── __tests__
│ │ ├── ProfileValidator.test.ts
│ │ ├── api.test.ts
│ │ ├── checkExistApiConfig.test.ts
│ │ ├── combineApiRequests.test.ts
│ │ ├── combineCommandSequences.test.ts
│ │ ├── context-mentions.test.ts
│ │ ├── experiments.test.ts
│ │ ├── getApiMetrics.test.ts
│ │ ├── language.test.ts
│ │ ├── modes.test.ts
│ │ ├── support-prompts.test.ts
│ │ └── vsCodeSelectorUtils.test.ts
│ ├── api.ts
│ ├── array.ts
│ ├── checkExistApiConfig.ts
│ ├── cline-rules.ts
│ ├── combineApiRequests.ts
│ ├── combineCommandSequences.ts
│ ├── context-mentions.ts
│ ├── cost.ts
│ ├── embeddingModels.ts
│ ├── experiments.ts
│ ├── getApiMetrics.ts
│ ├── globalFileNames.ts
│ ├── kilocode
│ │ ├── api.ts
│ │ └── mcp.ts
│ ├── language.ts
│ ├── mcp.ts
│ ├── modes.ts
│ ├── package.ts
│ ├── safeJsonParse.ts
│ ├── support-prompt.ts
│ ├── tools.ts
│ └── vsCodeSelectorUtils.ts
├── tsconfig.json
├── utils
│ ├── __tests__
│ │ ├── config.test.ts
│ │ ├── cost.test.ts
│ │ ├── enhance-prompt.test.ts
│ │ ├── git.test.ts
│ │ ├── path.test.ts
│ │ ├── shell.test.ts
│ │ ├── text-normalization.test.ts
│ │ ├── tiktoken.test.ts
│ │ ├── xml-matcher.test.ts
│ │ └── xml.test.ts
│ ├── commands.ts
│ ├── config.ts
│ ├── countTokens.ts
│ ├── fs.ts
│ ├── git.ts
│ ├── github-url-utils.ts
│ ├── kilocode-token.ts
│ ├── logging
│ │ ├── CompactLogger.ts
│ │ ├── CompactTransport.ts
│ │ ├── __tests__
│ │ │ ├── CompactLogger.test.ts
│ │ │ ├── CompactTransport.test.ts
│ │ │ └── MockTransport.ts
│ │ ├── index.ts
│ │ └── types.ts
│ ├── migrateSettings.ts
│ ├── path.ts
│ ├── pathUtils.ts
│ ├── shell.ts
│ ├── single-completion-handler.ts
│ ├── storage.ts
│ ├── text-normalization.ts
│ ├── tiktoken.ts
│ ├── tts.ts
│ ├── xml-matcher.ts
│ └── xml.ts
├── vitest.config.ts
├── walkthrough
│ ├── images
│ │ ├── askui.png
│ │ ├── context.gif
│ │ ├── custom_modes.gif
│ │ ├── design_patterns.png
│ │ ├── hn-clone-django.gif
│ │ ├── hn-nextjs.png
│ │ ├── modes.gif
│ │ └── unknown_error_stripe_rb.png
│ ├── step1.md
│ ├── step2.md
│ ├── step3.md
│ ├── step4.md
│ └── step5.md
└── workers
│ ├── countTokens.ts
│ └── types.ts
├── turbo.json
└── webview-ui
├── .gitignore
├── .storybook
├── main.ts
├── preview.ts
└── vscode.css
├── audio
├── celebration.wav
├── notification.wav
└── progress_loop.wav
├── components.json
├── eslint.config.mjs
├── index.html
├── jest.config.cjs
├── package.json
├── public
└── .gitkeep
├── src
├── App.tsx
├── __mocks__
│ ├── @vscode
│ │ └── webview-ui-toolkit
│ │ │ └── react.ts
│ ├── components
│ │ └── chat
│ │ │ └── TaskHeader.tsx
│ ├── i18n
│ │ ├── TranslationContext.tsx
│ │ └── setup.ts
│ ├── lucide-react.ts
│ ├── posthog-js.ts
│ ├── pretty-bytes.js
│ ├── shiki.ts
│ ├── utils
│ │ └── highlighter.ts
│ └── vscrui.ts
├── __tests__
│ ├── App.test.tsx
│ ├── ContextWindowProgress.test.tsx
│ └── ContextWindowProgressLogic.test.ts
├── codicon-custom.css
├── components
│ ├── account
│ │ └── AccountView.tsx
│ ├── chat
│ │ ├── Announcement.tsx
│ │ ├── AutoApproveMenu.tsx
│ │ ├── AutoApprovedRequestLimitWarning.tsx
│ │ ├── BatchFilePermission.tsx
│ │ ├── BottomControls.tsx
│ │ ├── BrowserSessionRow.tsx
│ │ ├── ChatRow.tsx
│ │ ├── ChatTextArea.tsx
│ │ ├── ChatView.tsx
│ │ ├── CheckpointWarning.tsx
│ │ ├── CodebaseSearchResult.tsx
│ │ ├── CodebaseSearchResultsDisplay.tsx
│ │ ├── CommandExecution.tsx
│ │ ├── CommandExecutionError.tsx
│ │ ├── ContextCondenseRow.tsx
│ │ ├── ContextMenu.tsx
│ │ ├── ContextWindowProgress.tsx
│ │ ├── FollowUpSuggest.tsx
│ │ ├── IconButton.tsx
│ │ ├── Markdown.tsx
│ │ ├── Mention.tsx
│ │ ├── ProfileViolationWarning.tsx
│ │ ├── ProgressIndicator.tsx
│ │ ├── ReasoningBlock.tsx
│ │ ├── ReportBugPreview.tsx
│ │ ├── SlashCommandMenu.tsx
│ │ ├── SystemPromptWarning.tsx
│ │ ├── TaskActions.tsx
│ │ ├── TaskHeader.tsx
│ │ ├── __tests__
│ │ │ ├── Announcement.test.tsx
│ │ │ ├── BatchFilePermission.test.tsx
│ │ │ ├── ChatTextArea.test.tsx
│ │ │ ├── ChatView.auto-approve.test.tsx
│ │ │ ├── ChatView.test.tsx
│ │ │ └── TaskHeader.test.tsx
│ │ └── checkpoints
│ │ │ ├── CheckpointMenu.tsx
│ │ │ ├── CheckpointSaved.tsx
│ │ │ └── schema.ts
│ ├── common
│ │ ├── CodeAccordian.tsx
│ │ ├── CodeBlock.tsx
│ │ ├── DangerButton.tsx
│ │ ├── MarkdownBlock.tsx
│ │ ├── MermaidBlock.tsx
│ │ ├── Tab.tsx
│ │ ├── TelemetryBanner.tsx
│ │ ├── Thumbnails.tsx
│ │ ├── ToolUseBlock.tsx
│ │ ├── VSCodeButtonLink.tsx
│ │ ├── __mocks__
│ │ │ ├── CodeBlock.tsx
│ │ │ └── MarkdownBlock.tsx
│ │ └── __tests__
│ │ │ └── CodeBlock.test.tsx
│ ├── history
│ │ ├── BatchDeleteTaskDialog.tsx
│ │ ├── CopyButton.tsx
│ │ ├── DeleteTaskDialog.tsx
│ │ ├── ExportButton.tsx
│ │ ├── HistoryPreview.tsx
│ │ ├── HistoryView.tsx
│ │ ├── TaskItem.tsx
│ │ ├── TaskItemFooter.tsx
│ │ ├── TaskItemHeader.tsx
│ │ ├── __tests__
│ │ │ ├── HistoryView.test.tsx
│ │ │ └── TaskItem.test.tsx
│ │ └── useTaskSearch.ts
│ ├── human-relay
│ │ └── HumanRelayDialog.tsx
│ ├── kilocode
│ │ ├── Welcome
│ │ │ └── WelcomeView.tsx
│ │ ├── chat
│ │ │ ├── LowCreditWarning.tsx
│ │ │ └── NewTaskPreview.tsx
│ │ ├── common
│ │ │ ├── ButtonLink.tsx
│ │ │ ├── ButtonPrimary.tsx
│ │ │ ├── ButtonSecondary.tsx
│ │ │ ├── Logo.tsx
│ │ │ └── RetryIconButton.tsx
│ │ ├── helpers.ts
│ │ └── profile
│ │ │ └── ProfileView.tsx
│ ├── kilocodeMcp
│ │ ├── ImagePreview.tsx
│ │ ├── LinkPreview.tsx
│ │ ├── McpResourceRow.tsx
│ │ ├── McpResponseDisplay.tsx
│ │ ├── McpRichUtil.ts
│ │ ├── McpToolRow.tsx
│ │ ├── McpView.tsx
│ │ ├── RICH_MCP_TESTING.md
│ │ └── marketplace
│ │ │ ├── McpMarketplaceCard.tsx
│ │ │ ├── McpMarketplaceView.tsx
│ │ │ └── McpSubmitCard.tsx
│ ├── mcp
│ │ ├── McpEnabledToggle.tsx
│ │ ├── McpErrorRow.tsx
│ │ ├── McpResourceRow.tsx
│ │ ├── McpToolRow.tsx
│ │ ├── McpView.tsx
│ │ └── __tests__
│ │ │ └── McpToolRow.test.tsx
│ ├── modes
│ │ ├── ModesView.tsx
│ │ └── __tests__
│ │ │ └── ModesView.test.tsx
│ ├── settings
│ │ ├── About.tsx
│ │ ├── ApiConfigManager.tsx
│ │ ├── ApiErrorMessage.tsx
│ │ ├── ApiOptions.tsx
│ │ ├── AutoApproveSettings.tsx
│ │ ├── AutoApproveToggle.tsx
│ │ ├── BrowserSettings.tsx
│ │ ├── CheckpointSettings.tsx
│ │ ├── CodeIndexSettings.tsx
│ │ ├── ConcurrentFileReadsExperiment.tsx
│ │ ├── ContextManagementSettings.tsx
│ │ ├── DiffSettingsControl.tsx
│ │ ├── ExperimentalFeature.tsx
│ │ ├── ExperimentalSettings.tsx
│ │ ├── LanguageSettings.tsx
│ │ ├── ModelDescriptionMarkdown.tsx
│ │ ├── ModelInfoView.tsx
│ │ ├── ModelPicker.tsx
│ │ ├── NotificationSettings.tsx
│ │ ├── PromptsSettings.tsx
│ │ ├── R1FormatSetting.tsx
│ │ ├── RateLimitSecondsControl.tsx
│ │ ├── Section.tsx
│ │ ├── SectionHeader.tsx
│ │ ├── SettingsFooter.tsx
│ │ ├── SettingsView.tsx
│ │ ├── TemperatureControl.tsx
│ │ ├── TerminalSettings.tsx
│ │ ├── ThinkingBudget.tsx
│ │ ├── __tests__
│ │ │ ├── ApiConfigManager.test.tsx
│ │ │ ├── ApiOptions.test.tsx
│ │ │ ├── AutoApproveToggle.test.tsx
│ │ │ ├── ConcurrentFileReadsExperiment.test.tsx
│ │ │ ├── ContextManagementSettings.test.tsx
│ │ │ ├── ModelPicker.test.tsx
│ │ │ ├── SettingsView.test.tsx
│ │ │ ├── TemperatureControl.test.tsx
│ │ │ └── ThinkingBudget.test.tsx
│ │ ├── constants.ts
│ │ ├── providers
│ │ │ ├── Anthropic.tsx
│ │ │ ├── Bedrock.tsx
│ │ │ ├── BedrockCustomArn.tsx
│ │ │ ├── Chutes.tsx
│ │ │ ├── DeepSeek.tsx
│ │ │ ├── Gemini.tsx
│ │ │ ├── Glama.tsx
│ │ │ ├── Groq.tsx
│ │ │ ├── LMStudio.tsx
│ │ │ ├── LiteLLM.tsx
│ │ │ ├── Mistral.tsx
│ │ │ ├── Ollama.tsx
│ │ │ ├── OpenAI.tsx
│ │ │ ├── OpenAICompatible.tsx
│ │ │ ├── OpenRouter.tsx
│ │ │ ├── OpenRouterBalanceDisplay.tsx
│ │ │ ├── Requesty.tsx
│ │ │ ├── RequestyBalanceDisplay.tsx
│ │ │ ├── Unbound.tsx
│ │ │ ├── VSCodeLM.tsx
│ │ │ ├── Vertex.tsx
│ │ │ ├── XAI.tsx
│ │ │ ├── __tests__
│ │ │ │ └── Bedrock.test.tsx
│ │ │ └── index.ts
│ │ ├── styles.ts
│ │ ├── transforms.ts
│ │ ├── types.ts
│ │ └── utils
│ │ │ ├── __tests__
│ │ │ ├── headers.test.ts
│ │ │ └── organizationFilters.test.ts
│ │ │ ├── headers.ts
│ │ │ └── organizationFilters.ts
│ ├── ui
│ │ ├── __tests__
│ │ │ └── select-dropdown.test.tsx
│ │ ├── alert-dialog.tsx
│ │ ├── autosize-textarea.tsx
│ │ ├── badge.tsx
│ │ ├── button.tsx
│ │ ├── chat
│ │ │ ├── Chat.tsx
│ │ │ ├── ChatInput.tsx
│ │ │ ├── ChatInputProvider.ts
│ │ │ ├── ChatMessage.tsx
│ │ │ ├── ChatMessageProvider.ts
│ │ │ ├── ChatMessages.tsx
│ │ │ ├── ChatProvider.ts
│ │ │ ├── index.ts
│ │ │ ├── types.ts
│ │ │ ├── useChatInput.ts
│ │ │ ├── useChatMessage.ts
│ │ │ └── useChatUI.ts
│ │ ├── checkbox.tsx
│ │ ├── collapsible.tsx
│ │ ├── command.tsx
│ │ ├── dialog.tsx
│ │ ├── dropdown-menu.tsx
│ │ ├── hooks
│ │ │ ├── __tests__
│ │ │ │ └── useSelectedModel.test.ts
│ │ │ ├── index.ts
│ │ │ ├── useClipboard.ts
│ │ │ ├── useOpenRouterKeyInfo.ts
│ │ │ ├── useOpenRouterModelProviders.ts
│ │ │ ├── useRequestyKeyInfo.ts
│ │ │ ├── useRooPortal.ts
│ │ │ ├── useRouterModels.ts
│ │ │ └── useSelectedModel.ts
│ │ ├── index.ts
│ │ ├── input.tsx
│ │ ├── markdown
│ │ │ ├── Blockquote.tsx
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── Markdown.tsx
│ │ │ └── index.ts
│ │ ├── popover.tsx
│ │ ├── progress.tsx
│ │ ├── select-dropdown.tsx
│ │ ├── select.tsx
│ │ ├── separator.tsx
│ │ ├── slider.tsx
│ │ ├── textarea.tsx
│ │ └── tooltip.tsx
│ └── welcome
│ │ ├── RooHero.tsx
│ │ ├── RooTips.tsx
│ │ ├── WelcomeView.tsx
│ │ └── __tests__
│ │ └── RooTips.test.tsx
├── context
│ ├── ExtensionStateContext.tsx
│ └── __tests__
│ │ └── ExtensionStateContext.test.tsx
├── i18n
│ ├── TranslationContext.tsx
│ ├── __mocks__
│ │ └── TranslationContext.tsx
│ ├── __tests__
│ │ └── TranslationContext.test.tsx
│ ├── locales
│ │ ├── ca
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── de
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── en
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── es
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── fr
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── hi
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── id
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── it
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── ja
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── ko
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── nl
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── pl
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── pt-BR
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── ru
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── tr
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── vi
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ ├── zh-CN
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ │ └── zh-TW
│ │ │ ├── .gitkeep
│ │ │ ├── account.json
│ │ │ ├── chat.json
│ │ │ ├── common.json
│ │ │ ├── history.json
│ │ │ ├── humanRelay.json
│ │ │ ├── kilocode.json
│ │ │ ├── mcp.json
│ │ │ ├── prompts.json
│ │ │ ├── settings.json
│ │ │ └── welcome.json
│ ├── setup.ts
│ └── test-utils.ts
├── index.css
├── index.tsx
├── kilocode
│ ├── helpers.ts
│ └── hooks
│ │ └── useVSCodeTheme.ts
├── lib
│ └── utils.ts
├── oauth
│ └── urls.ts
├── preflight.css
├── setupTests.tsx
├── stories
│ ├── AutosizeTextarea.stories.tsx
│ ├── Badge.stories.tsx
│ ├── Button.stories.ts
│ ├── Chat.stories.tsx
│ ├── Collapsible.stories.tsx
│ ├── Combobox.stories.tsx
│ ├── DropdownMenu.stories.tsx
│ ├── Progress.stories.tsx
│ ├── Slider.stories.tsx
│ ├── Welcome.mdx
│ └── assets
│ │ └── .gitkeep
├── types.d.ts
├── utils
│ ├── TelemetryClient.ts
│ ├── __tests__
│ │ ├── command-validation.test.ts
│ │ ├── context-mentions.test.ts
│ │ ├── format.test.ts
│ │ ├── model-utils.test.ts
│ │ └── path-mentions.test.ts
│ ├── clipboard.ts
│ ├── command-validation.ts
│ ├── context-mentions.ts
│ ├── docLinks.ts
│ ├── fixPointerEvents.ts
│ ├── format.ts
│ ├── formatPrice.ts
│ ├── getLanguageFromPath.ts
│ ├── highlight.ts
│ ├── highlighter.ts
│ ├── kilocode
│ │ └── mcp.ts
│ ├── mcp.ts
│ ├── model-utils.ts
│ ├── path-mentions.ts
│ ├── removeLeadingNonAlphanumeric.ts
│ ├── slash-commands.ts
│ ├── textMateToHljs.ts
│ ├── useDebounceEffect.ts
│ ├── validate.ts
│ └── vscode.ts
└── vite-env.d.ts
├── tsconfig.json
└── vite.config.ts
/.changeset/README.md:
--------------------------------------------------------------------------------
1 | # Changesets
2 |
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 |
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 |
--------------------------------------------------------------------------------
/.changeset/changelog-config.js:
--------------------------------------------------------------------------------
1 | const getReleaseLine = async (changeset) => {
2 | const [firstLine] = changeset.summary
3 | .split("\n")
4 | .map((l) => l.trim())
5 | .filter(Boolean)
6 | return `- ${firstLine}`
7 | }
8 |
9 | const getDependencyReleaseLine = async () => {
10 | return ""
11 | }
12 |
13 | const changelogFunctions = {
14 | getReleaseLine,
15 | getDependencyReleaseLine,
16 | }
17 |
18 | module.exports = changelogFunctions
19 |
--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
3 | "changelog": ["@changesets/changelog-github", { "repo": "Kilo-Org/kilocode" }],
4 | "commit": false,
5 | "fixed": [["kilo-code"]],
6 | "linked": [],
7 | "access": "restricted",
8 | "baseBranch": "main",
9 | "updateInternalDependencies": "patch",
10 | "ignore": []
11 | }
12 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | # Build artifacts
2 | bin/
3 | !bin/roo-code-latest.vsix
4 | dist/
5 | **/dist/
6 | out/
7 | **/out/
8 |
9 | # Dependencies
10 | node_modules/
11 | **/node_modules/
12 |
13 | # Test and development files
14 | coverage/
15 | **/.vscode-test/
16 |
17 | knip.json
18 | .husky/
19 |
--------------------------------------------------------------------------------
/.env.sample:
--------------------------------------------------------------------------------
1 | POSTHOG_API_KEY=key-goes-here
2 |
3 | # Roo Code Cloud / Local Development
4 | CLERK_BASE_URL=https://epic-chamois-85.clerk.accounts.dev
5 | ROO_CODE_API_URL=http://localhost:3000
6 |
--------------------------------------------------------------------------------
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
1 | # Ran Prettier on all files - https://github.com/RooCodeInc/Roo-Code/pull/404
2 | 60a0a824b96a0b326af4d8871b6903f4ddcfe114
3 | 579bdd9dbf6d2d569e5e7adb5ff6292b1e42ea34
4 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | demo.gif filter=lfs diff=lfs merge=lfs -text
2 | assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
3 |
--------------------------------------------------------------------------------
/.gitconfig:
--------------------------------------------------------------------------------
1 | [blame]
2 | ignoreRevsFile = .git-blame-ignore-revs
3 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # These owners will be the default owners for everything in the repo
2 | * @mrubens @cte
3 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: File a bug report
3 | type: "Bug"
4 | body:
5 | - type: textarea
6 | id: description
7 | attributes:
8 | label: Description
9 | description: |
10 | Which app version are you using (e.g. v3.3.1)?
11 | Which API Provider are you using (e.g. Kilo, OpenRouter, Anthropic)?
12 | Which Model are you using (e.g. Claude 3.7 Sonnet)?
13 | Steps to reproduce?
14 | Relevant API request output?
15 | Additional context?
16 | Screenshots?
17 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "npm" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "weekly"
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .pnpm-store
2 | dist
3 | out
4 | out-*
5 | node_modules
6 | coverage/
7 | mock/
8 | .DS_Store
9 | *.orig
10 |
11 | # Builds
12 | bin/
13 | *.vsix
14 |
15 | # Local prompts and rules
16 | /local-prompts
17 |
18 | # Test environment
19 | .test_env
20 | .vscode-test/
21 |
22 | # Docs
23 | docs/_site/
24 |
25 | # Dotenv
26 | .env
27 | .env.*
28 | !.env.*.sample
29 |
30 | # Logging
31 | logs
32 |
33 | # Vite development
34 | .vite-port
35 |
36 | # kilocode_change
37 | .history/
38 | .aider*
39 | # Turborepo
40 | .turbo
41 |
42 | # IntelliJ and Qodo plugin folders
43 | .idea/
44 | .qodo/
45 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | branch="$(git rev-parse --abbrev-ref HEAD)"
2 |
3 | if [ "$branch" = "main" ]; then
4 | echo "You can't commit directly to main - please check out a branch."
5 | exit 1
6 | fi
7 |
8 | # Detect if running on Windows and use pnpm.cmd, otherwise use pnpm.
9 | if [ "$OS" = "Windows_NT" ]; then
10 | pnpm_cmd="pnpm.cmd"
11 | else
12 | if command -v pnpm >/dev/null 2>&1; then
13 | pnpm_cmd="pnpm"
14 | else
15 | pnpm_cmd="npx pnpm"
16 | fi
17 | fi
18 |
19 | # Detect if running on Windows and use npx.cmd, otherwise use npx.
20 | if [ "$OS" = "Windows_NT" ]; then
21 | npx_cmd="npx.cmd"
22 | else
23 | npx_cmd="npx"
24 | fi
25 |
26 | $npx_cmd lint-staged
27 | $pnpm_cmd lint
28 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | v20.19.2
2 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 4,
3 | "useTabs": true,
4 | "printWidth": 120,
5 | "semi": false,
6 | "bracketSameLine": true,
7 | "ignore": ["node_modules", "dist", "build", "out", ".next", ".venv", "pnpm-lock.yaml"]
8 | }
9 |
--------------------------------------------------------------------------------
/.roo/rules/rules.md:
--------------------------------------------------------------------------------
1 | # Code Quality Rules
2 |
3 | 1. Test Coverage:
4 |
5 | - Before attempting completion, always make sure that any code changes have test coverage
6 | - Ensure all tests pass before submitting changes
7 |
8 | 2. Lint Rules:
9 |
10 | - Never disable any lint rules without explicit user approval
11 |
12 | 3. Styling Guidelines:
13 | - Use Tailwind CSS classes instead of inline style objects for new markup
14 | - VSCode CSS variables must be added to webview-ui/src/index.css before using them in Tailwind classes
15 | - Example: `
` instead of style objects
16 |
17 | # Adding a New Setting
18 |
19 | To add a new setting that persists its state, follow the steps in docs/settings.md
20 |
--------------------------------------------------------------------------------
/.rooignore:
--------------------------------------------------------------------------------
1 | .env
2 |
--------------------------------------------------------------------------------
/.tool-versions:
--------------------------------------------------------------------------------
1 | nodejs 20.19.2
2 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "dbaeumer.vscode-eslint",
6 | "esbenp.prettier-vscode",
7 | "csstools.postcss",
8 | "bradlc.vscode-tailwindcss",
9 | "connor4312.esbuild-problem-matchers"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false, // set this to true to hide the "out" folder with the compiled JS files
5 | "dist": false // set this to true to hide the "dist" folder with the compiled JS files
6 | },
7 | "search.exclude": {
8 | "out": true, // set this to false to include "out" folder in search results
9 | "dist": true // set this to false to include "dist" folder in search results
10 | },
11 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
12 | "typescript.tsc.autoDetect": "off",
13 | "i18n-ally.localesPaths": ["webview-ui/src/i18n", "webview-ui/src/__mocks__/i18n", "webview-ui/src/i18n/locales"]
14 | }
15 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Kilo Code
2 | Copyright 2025- Kilo Code LLC
3 |
4 | This product is a fork of Roo Code, which is a fork of Cline.
5 |
6 | Original work: Copyright 2025 Cline Bot Inc.
7 |
8 | Modified work (Roo Code): Copyright 2025 Roo Veterinary Inc.
9 |
10 | Modified work (Kilo Code): Copyright 2025- Kilo Code LLC.
--------------------------------------------------------------------------------
/apps/vscode-e2e/.env.integration.example:
--------------------------------------------------------------------------------
1 | OPENROUTER_API_KEY=sk-or-v1-...
2 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/.env.local.sample:
--------------------------------------------------------------------------------
1 | OPENROUTER_API_KEY=sk-or-v1-...
2 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/.vscode-test.mjs:
--------------------------------------------------------------------------------
1 | /**
2 | * See: https://code.visualstudio.com/api/working-with-extensions/testing-extension
3 | */
4 |
5 | import { defineConfig } from "@vscode/test-cli"
6 |
7 | export default defineConfig({
8 | label: "integrationTest",
9 | files: "out/suite/**/*.test.js",
10 | workspaceFolder: ".",
11 | mocha: {
12 | ui: "tdd",
13 | timeout: 60000,
14 | },
15 | launchArgs: ["--enable-proposed-api=kilocode.Kilo-Code", "--disable-extensions"],
16 | })
17 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@roo-code/config-eslint/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/src/runTest.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path"
2 |
3 | import { runTests } from "@vscode/test-electron"
4 |
5 | async function main() {
6 | try {
7 | // The folder containing the Extension Manifest package.json
8 | // Passed to `--extensionDevelopmentPath`
9 | const extensionDevelopmentPath = path.resolve(__dirname, "../../../src")
10 |
11 | // The path to the extension test script
12 | // Passed to --extensionTestsPath
13 | const extensionTestsPath = path.resolve(__dirname, "./suite/index")
14 |
15 | // Download VS Code, unzip it and run the integration test
16 | await runTests({ extensionDevelopmentPath, extensionTestsPath })
17 | } catch {
18 | console.error("Failed to run tests")
19 | process.exit(1)
20 | }
21 | }
22 |
23 | main()
24 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/src/types/global.d.ts:
--------------------------------------------------------------------------------
1 | import type { RooCodeAPI } from "@roo-code/types"
2 |
3 | declare global {
4 | // eslint-disable-next-line no-var
5 | var api: RooCodeAPI
6 | }
7 |
8 | export {}
9 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/tsconfig.esm.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@roo-code/config-typescript/base.json",
3 | "compilerOptions": {
4 | "outDir": "out"
5 | },
6 | "include": ["src"],
7 | "exclude": ["node_modules"]
8 | }
9 |
--------------------------------------------------------------------------------
/apps/vscode-e2e/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "CommonJS",
4 | "moduleResolution": "Node",
5 | "esModuleInterop": true,
6 | "target": "ES2022",
7 | "lib": ["ES2022", "ESNext.Disposable", "DOM"],
8 | "sourceMap": true,
9 | "strict": true,
10 | "skipLibCheck": true,
11 | "useUnknownInCatchVariables": false,
12 | "outDir": "out"
13 | },
14 | "include": ["src"],
15 | "exclude": [".vscode-test", "**/node_modules/**", "out"]
16 | }
17 |
--------------------------------------------------------------------------------
/apps/vscode-nightly/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 |
--------------------------------------------------------------------------------
/apps/vscode-nightly/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@roo-code/vscode-nightly",
3 | "description": "Nightly build for the Kilo Code VSCode extension.",
4 | "private": true,
5 | "packageManager": "pnpm@10.8.1",
6 | "scripts": {
7 | "bundle:nightly": "node esbuild.mjs",
8 | "vsix:nightly": "cd build && mkdirp ../../../bin && npx vsce package --no-dependencies --out ../../../bin",
9 | "clean": "rimraf build .turbo"
10 | },
11 | "devDependencies": {
12 | "@roo-code/build": "workspace:^"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/vscode-nightly/package.nightly.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "kilo-code-nightly",
3 | "version": "0.0.1",
4 | "icon": "assets/icons/icon-nightly.png",
5 | "scripts": {}
6 | }
7 |
--------------------------------------------------------------------------------
/apps/vscode-nightly/package.nls.nightly.json:
--------------------------------------------------------------------------------
1 | {
2 | "extension.displayName": "Kilo Code Nightly",
3 | "views.contextMenu.label": "Kilo Code Nightly",
4 | "views.terminalMenu.label": "Kilo Code Nightly",
5 | "views.activitybar.title": "Kilo Code Nightly",
6 | "configuration.title": "Kilo Code Nightly"
7 | }
8 |
--------------------------------------------------------------------------------
/evals/.env.sample:
--------------------------------------------------------------------------------
1 | BENCHMARKS_DB_PATH=file:/tmp/evals.db
2 |
--------------------------------------------------------------------------------
/evals/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # Dependencies
4 | node_modules
5 | .pnp
6 | .pnp.js
7 |
8 | # Local env files
9 | .env
10 | .env.*
11 | !.env.sample
12 |
13 | # Testing
14 | coverage
15 |
16 | # Turbo
17 | .turbo
18 |
19 | # Vercel
20 | .vercel
21 |
22 | # Next.js
23 | next-env.d.ts
24 |
25 | # Build Outputs
26 | .next/
27 | out/
28 | build
29 | dist
30 | *.tsbuildinfo
31 |
32 | # Debug
33 | npm-debug.log*
34 | yarn-debug.log*
35 | yarn-error.log*
36 |
37 | # Misc
38 | .DS_Store
39 | *.pem
40 |
41 | # Evals
42 | evals
43 |
--------------------------------------------------------------------------------
/evals/.npmrc:
--------------------------------------------------------------------------------
1 | # https://github.com/vercel/next.js/issues/68805
2 | public-hoist-pattern[]=*libsql*
3 |
--------------------------------------------------------------------------------
/evals/.tool-versions:
--------------------------------------------------------------------------------
1 | python 3.13.2
2 | golang 1.24.2
3 | rust 1.85.1
4 | nodejs 20.19.2
5 |
--------------------------------------------------------------------------------
/evals/README.md:
--------------------------------------------------------------------------------
1 | # Run Kilo Code Evals
2 |
3 | ## Get Started
4 |
5 | NOTE: This is MacOS only for now!
6 |
7 | Clone the Kilo Code repo:
8 |
9 | ```sh
10 | git clone https://github.com/Kilo-Org/kilocode.git
11 | cd kilocode
12 | ```
13 |
14 | Run the setup script:
15 |
16 | ```sh
17 | cd evals
18 | ./scripts/setup.sh
19 | ```
20 |
21 | Navigate to [localhost:3000](http://localhost:3000/) in your browser.
22 |
--------------------------------------------------------------------------------
/evals/apps/cli/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@evals/eslint-config/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/evals/apps/cli/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@evals/cli",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "lint": "eslint src/**/*.ts --max-warnings=0",
7 | "check-types": "tsc --noEmit",
8 | "format": "prettier --write src",
9 | "dev": "dotenvx run -f ../../.env -- tsx src/index.ts"
10 | },
11 | "dependencies": {
12 | "@evals/db": "workspace:^",
13 | "@evals/ipc": "workspace:^",
14 | "@evals/lib": "workspace:^",
15 | "@evals/types": "workspace:^",
16 | "execa": "^9.5.2",
17 | "gluegun": "^5.1.2",
18 | "p-map": "^7.0.3",
19 | "p-wait-for": "^5.0.2",
20 | "ps-tree": "^1.2.0"
21 | },
22 | "devDependencies": {
23 | "@evals/eslint-config": "workspace:^",
24 | "@evals/typescript-config": "workspace:^",
25 | "@types/ps-tree": "^1.1.6"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/evals/apps/cli/src/paths.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path"
2 | import { fileURLToPath } from "url"
3 |
4 | export const __dirname = path.dirname(fileURLToPath(import.meta.url))
5 |
6 | export const extensionDevelopmentPath = path.resolve(__dirname, "..", "..", "..", "..")
7 | export const exercisesPath = path.resolve(extensionDevelopmentPath, "..", "evals")
8 |
--------------------------------------------------------------------------------
/evals/apps/cli/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@evals/typescript-config/base.json",
3 | "include": ["src"],
4 | "exclude": ["node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/evals/apps/web/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "new-york",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "",
8 | "css": "src/app/globals.css",
9 | "baseColor": "neutral",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | },
20 | "iconLibrary": "lucide"
21 | }
22 |
--------------------------------------------------------------------------------
/evals/apps/web/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { nextJsConfig } from "@evals/eslint-config/next-js"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [
5 | ...nextJsConfig,
6 | {
7 | rules: {
8 | "no-unused-vars": "off",
9 | "@typescript-eslint/no-unused-vars": [
10 | "error",
11 | {
12 | caughtErrorsIgnorePattern: "^_",
13 | },
14 | ],
15 | },
16 | },
17 | ]
18 |
--------------------------------------------------------------------------------
/evals/apps/web/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next"
2 |
3 | const nextConfig: NextConfig = {
4 | /* config options here */
5 | }
6 |
7 | export default nextConfig
8 |
--------------------------------------------------------------------------------
/evals/apps/web/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | const config = {
2 | plugins: ["@tailwindcss/postcss"],
3 | }
4 |
5 | export default config
6 |
--------------------------------------------------------------------------------
/evals/apps/web/public/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/evals/apps/web/public/.gitkeep
--------------------------------------------------------------------------------
/evals/apps/web/src/app/api/runs/route.ts:
--------------------------------------------------------------------------------
1 | import { NextResponse } from "next/server"
2 |
3 | import { createRun } from "@evals/db"
4 |
5 | export async function POST(request: Request) {
6 | try {
7 | const run = await createRun(await request.json())
8 | return NextResponse.json({ run }, { status: 201 })
9 | } catch (error) {
10 | return NextResponse.json({ error: (error as Error).message }, { status: 500 })
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/evals/apps/web/src/app/api/tasks/route.ts:
--------------------------------------------------------------------------------
1 | import { NextResponse } from "next/server"
2 |
3 | import { createTask } from "@evals/db"
4 |
5 | export async function POST(request: Request) {
6 | try {
7 | const task = await createTask(await request.json())
8 | return NextResponse.json({ task }, { status: 201 })
9 | } catch (error) {
10 | return NextResponse.json({ error: (error as Error).message }, { status: 500 })
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/evals/apps/web/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/evals/apps/web/src/app/favicon.ico
--------------------------------------------------------------------------------
/evals/apps/web/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import { getRuns } from "@evals/db"
2 |
3 | import { Home } from "./home"
4 |
5 | export const dynamic = "force-dynamic"
6 |
7 | export default async function Page() {
8 | const runs = await getRuns()
9 | return
10 | }
11 |
--------------------------------------------------------------------------------
/evals/apps/web/src/app/runs/[id]/page.tsx:
--------------------------------------------------------------------------------
1 | import { findRun } from "@evals/db"
2 |
3 | import { Run } from "./run"
4 |
5 | export default async function Page({ params }: { params: Promise<{ id: string }> }) {
6 | const { id } = await params
7 | const run = await findRun(Number(id))
8 |
9 | return (
10 |
11 |
12 |
13 | )
14 | }
15 |
--------------------------------------------------------------------------------
/evals/apps/web/src/app/runs/[id]/task-status.tsx:
--------------------------------------------------------------------------------
1 | import { CircleCheck, CircleDashed, CircleSlash, LoaderCircle } from "lucide-react"
2 |
3 | import { type Task } from "@evals/db"
4 |
5 | type TaskStatusProps = {
6 | task: Task
7 | running: boolean
8 | }
9 |
10 | export const TaskStatus = ({ task, running }: TaskStatusProps) => {
11 | return task.passed === false ? (
12 |
13 | ) : task.passed === true ? (
14 |
15 | ) : running ? (
16 |
17 | ) : (
18 |
19 | )
20 | }
21 |
--------------------------------------------------------------------------------
/evals/apps/web/src/app/runs/new/page.tsx:
--------------------------------------------------------------------------------
1 | import { NewRun } from "./new-run"
2 |
3 | export default function Page() {
4 | return (
5 |
6 |
7 |
8 | )
9 | }
10 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/layout/header.tsx:
--------------------------------------------------------------------------------
1 | import { HoppingLogo } from "./logo"
2 |
3 | export const Header = () => (
4 |
5 |
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/providers/index.ts:
--------------------------------------------------------------------------------
1 | export { ReactQueryProvider } from "./react-query-provider"
2 | export { ThemeProvider } from "./theme-provider"
3 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/providers/react-query-provider.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
4 |
5 | export function ReactQueryProvider({ children }: { children: React.ReactNode }) {
6 | const queryClient = new QueryClient()
7 | return {children}
8 | }
9 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/providers/theme-provider.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import { type ThemeProviderProps } from "next-themes"
5 | import dynamic from "next/dynamic"
6 |
7 | const NextThemesProvider = dynamic(() => import("next-themes").then((e) => e.ThemeProvider), {
8 | ssr: false,
9 | })
10 |
11 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
12 | return {children}
13 | }
14 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./alert-dialog"
2 | export * from "./badge"
3 | export * from "./button"
4 | export * from "./command"
5 | export * from "./dialog"
6 | export * from "./drawer"
7 | export * from "./dropdown-menu"
8 | export * from "./form"
9 | export * from "./input"
10 | export * from "./label"
11 | export * from "./multi-select"
12 | export * from "./popover"
13 | export * from "./scroll-area"
14 | export * from "./select"
15 | export * from "./separator"
16 | export * from "./slider"
17 | export * from "./sonner"
18 | export * from "./table"
19 | export * from "./tabs"
20 | export * from "./textarea"
21 | export * from "./tooltip"
22 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/ui/label.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as LabelPrimitive from "@radix-ui/react-label"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | function Label({ className, ...props }: React.ComponentProps) {
9 | return (
10 |
18 | )
19 | }
20 |
21 | export { Label }
22 |
--------------------------------------------------------------------------------
/evals/apps/web/src/components/ui/sonner.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { useTheme } from "next-themes"
4 | import { Toaster as Sonner, ToasterProps } from "sonner"
5 |
6 | const Toaster = ({ ...props }: ToasterProps) => {
7 | const { theme = "system" } = useTheme()
8 |
9 | return (
10 |
22 | )
23 | }
24 |
25 | export { Toaster }
26 |
--------------------------------------------------------------------------------
/evals/apps/web/src/hooks/use-exercises.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query"
2 |
3 | import { getExercises } from "@/lib/server/exercises"
4 |
5 | export const useExercises = () => useQuery({ queryKey: ["exercises"], queryFn: getExercises })
6 |
--------------------------------------------------------------------------------
/evals/apps/web/src/hooks/use-process-tree.ts:
--------------------------------------------------------------------------------
1 | import { useQuery } from "@tanstack/react-query"
2 |
3 | import { getProcessList } from "@/lib/server/processes"
4 |
5 | export const useProcessList = (pid: number | null) =>
6 | useQuery({
7 | queryKey: ["process-tree", pid],
8 | queryFn: () => (pid ? getProcessList(pid) : []),
9 | enabled: !!pid,
10 | refetchInterval: 30_000,
11 | })
12 |
--------------------------------------------------------------------------------
/evals/apps/web/src/lib/server/tasks.ts:
--------------------------------------------------------------------------------
1 | "use server"
2 |
3 | import { revalidatePath } from "next/cache"
4 |
5 | import * as db from "@evals/db"
6 |
7 | export async function getTasks(runId: number) {
8 | const tasks = await db.getTasks(runId)
9 | revalidatePath(`/runs/${runId}`)
10 | return tasks
11 | }
12 |
--------------------------------------------------------------------------------
/evals/apps/web/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/evals/apps/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@evals/typescript-config/nextjs.json",
3 | "compilerOptions": {
4 | "plugins": [{ "name": "next" }],
5 | "paths": { "@/*": ["./src/*"] }
6 | },
7 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
8 | "exclude": ["node_modules"]
9 | }
10 |
--------------------------------------------------------------------------------
/evals/config/eslint/base.js:
--------------------------------------------------------------------------------
1 | import js from "@eslint/js"
2 | import eslintConfigPrettier from "eslint-config-prettier"
3 | import turboPlugin from "eslint-plugin-turbo"
4 | import tseslint from "typescript-eslint"
5 | import onlyWarn from "eslint-plugin-only-warn"
6 |
7 | /**
8 | * A shared ESLint configuration for the repository.
9 | *
10 | * @type {import("eslint").Linter.Config[]}
11 | * */
12 | export const config = [
13 | js.configs.recommended,
14 | eslintConfigPrettier,
15 | ...tseslint.configs.recommended,
16 | {
17 | plugins: {
18 | turbo: turboPlugin,
19 | },
20 | rules: {
21 | "turbo/no-undeclared-env-vars": "warn",
22 | },
23 | },
24 | {
25 | plugins: {
26 | onlyWarn,
27 | },
28 | },
29 | {
30 | ignores: ["dist/**"],
31 | },
32 | ]
33 |
--------------------------------------------------------------------------------
/evals/config/eslint/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@evals/eslint-config",
3 | "private": true,
4 | "type": "module",
5 | "exports": {
6 | "./base": "./base.js",
7 | "./next-js": "./next.js"
8 | },
9 | "devDependencies": {
10 | "@eslint/js": "^9.22.0",
11 | "@next/eslint-plugin-next": "^15.2.1",
12 | "eslint": "^9.22.0",
13 | "eslint-config-prettier": "^10.1.1",
14 | "eslint-plugin-only-warn": "^1.1.0",
15 | "eslint-plugin-react": "^7.37.4",
16 | "eslint-plugin-react-hooks": "^5.2.0",
17 | "eslint-plugin-turbo": "^2.4.4",
18 | "globals": "^16.0.0",
19 | "typescript-eslint": "^8.26.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/evals/config/typescript/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "declarationMap": true,
6 | "esModuleInterop": true,
7 | "incremental": false,
8 | "isolatedModules": true,
9 | "lib": ["es2022", "DOM", "DOM.Iterable"],
10 | "module": "NodeNext",
11 | "moduleDetection": "force",
12 | "moduleResolution": "NodeNext",
13 | "noUncheckedIndexedAccess": true,
14 | "resolveJsonModule": true,
15 | "skipLibCheck": true,
16 | "strict": true,
17 | "target": "ES2022"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/evals/config/typescript/cjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "module": "CommonJS",
5 | "moduleResolution": "Node",
6 | "esModuleInterop": true,
7 | "target": "ES2022",
8 | "lib": ["ES2022", "ESNext.Disposable", "DOM"],
9 | "sourceMap": true,
10 | "strict": true,
11 | "skipLibCheck": true,
12 | "useUnknownInCatchVariables": false
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/evals/config/typescript/nextjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "extends": "./base.json",
4 | "compilerOptions": {
5 | "plugins": [{ "name": "next" }],
6 | "module": "ESNext",
7 | "moduleResolution": "bundler",
8 | "allowJs": true,
9 | "jsx": "preserve",
10 | "noEmit": true
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/evals/config/typescript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@evals/typescript-config",
3 | "private": true,
4 | "publishConfig": {
5 | "access": "public"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/evals/packages/db/.gitignore:
--------------------------------------------------------------------------------
1 | test.db
2 |
--------------------------------------------------------------------------------
/evals/packages/db/README.md:
--------------------------------------------------------------------------------
1 | ## Running Migrations
2 |
3 | Update `src/schema.ts` as needed, and then run:
4 |
5 | ```sh
6 | pnpm db:generate
7 | ```
8 |
9 | Inspect the sql in the migration file added to `drizzle/`.
10 |
11 | If it looks okay, then run:
12 |
13 | ```sh
14 | pnpm db:migrate
15 | ```
16 |
--------------------------------------------------------------------------------
/evals/packages/db/drizzle.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "drizzle-kit"
2 |
3 | if ((!process.env.TURSO_CONNECTION_URL || !process.env.TURSO_AUTH_TOKEN) && !process.env.BENCHMARKS_DB_PATH) {
4 | throw new Error("TURSO_CONNECTION_URL and TURSO_AUTH_TOKEN or BENCHMARKS_DB_PATH must be set")
5 | }
6 |
7 | const dialect = process.env.BENCHMARKS_DB_PATH ? "sqlite" : "turso"
8 |
9 | const dbCredentials = process.env.BENCHMARKS_DB_PATH
10 | ? { url: process.env.BENCHMARKS_DB_PATH }
11 | : { url: process.env.TURSO_CONNECTION_URL!, authToken: process.env.TURSO_AUTH_TOKEN! }
12 |
13 | export default defineConfig({
14 | out: "./drizzle",
15 | schema: "./src/schema.ts",
16 | dialect,
17 | dbCredentials,
18 | })
19 |
--------------------------------------------------------------------------------
/evals/packages/db/drizzle/0001_lush_reavers.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `runs` ADD `settings` blob;
--------------------------------------------------------------------------------
/evals/packages/db/drizzle/0002_white_flatman.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `runs` ADD `concurrency` integer DEFAULT 2 NOT NULL;
--------------------------------------------------------------------------------
/evals/packages/db/drizzle/0003_sweet_chimera.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `taskMetrics` ADD `toolUsage` text;
--------------------------------------------------------------------------------
/evals/packages/db/drizzle/0004_absent_slapstick.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `toolErrors` (
2 | `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3 | `runId` integer,
4 | `taskId` integer,
5 | `toolName` text NOT NULL,
6 | `error` text NOT NULL,
7 | `createdAt` integer NOT NULL,
8 | FOREIGN KEY (`runId`) REFERENCES `runs`(`id`) ON UPDATE no action ON DELETE no action,
9 | FOREIGN KEY (`taskId`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE no action
10 | );
11 |
--------------------------------------------------------------------------------
/evals/packages/db/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@evals/eslint-config/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/evals/packages/db/scripts/enable-wal.mts:
--------------------------------------------------------------------------------
1 | import { db } from "../src/db.js"
2 |
3 | const main = async () => {
4 | // Enable WAL mode for better performance and concurrency.
5 | // https://til.simonwillison.net/sqlite/enabling-wal-mode
6 | try {
7 | const { rows } = await db.$client.execute("PRAGMA journal_mode = WAL;")
8 | const row = rows[0]
9 |
10 | if (row) {
11 | console.log(`SQLite journal mode set to: ${row[0]}`)
12 | process.exit(0)
13 | } else {
14 | console.error("Failed to enable WAL mode: no rows returned")
15 | process.exit(1)
16 | }
17 | } catch (error) {
18 | console.error(error)
19 | process.exit(1)
20 | }
21 | }
22 |
23 | main()
24 |
--------------------------------------------------------------------------------
/evals/packages/db/src/db.ts:
--------------------------------------------------------------------------------
1 | import { drizzle } from "drizzle-orm/libsql"
2 |
3 | import { schema } from "./schema.js"
4 |
5 | if ((!process.env.TURSO_CONNECTION_URL || !process.env.TURSO_AUTH_TOKEN) && !process.env.BENCHMARKS_DB_PATH) {
6 | throw new Error("TURSO_CONNECTION_URL and TURSO_AUTH_TOKEN or BENCHMARKS_DB_PATH must be set")
7 | }
8 |
9 | const connection = process.env.BENCHMARKS_DB_PATH
10 | ? { url: process.env.BENCHMARKS_DB_PATH, concurrency: 50 }
11 | : { url: process.env.TURSO_CONNECTION_URL!, authToken: process.env.TURSO_AUTH_TOKEN! }
12 |
13 | export const db = drizzle({ schema, connection })
14 |
--------------------------------------------------------------------------------
/evals/packages/db/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./schema.js"
2 |
3 | export * from "./queries/runs.js"
4 | export * from "./queries/tasks.js"
5 | export * from "./queries/taskMetrics.js"
6 | export * from "./queries/toolErrors.js"
7 |
--------------------------------------------------------------------------------
/evals/packages/db/src/queries/errors.ts:
--------------------------------------------------------------------------------
1 | export class RecordNotFoundError extends Error {}
2 |
3 | export class RecordNotCreatedError extends Error {}
4 |
--------------------------------------------------------------------------------
/evals/packages/db/src/queries/toolErrors.ts:
--------------------------------------------------------------------------------
1 | import { RecordNotCreatedError } from "./errors.js"
2 | import type { InsertToolError } from "../schema.js"
3 | import { insertToolErrorSchema, toolErrors } from "../schema.js"
4 | import { db } from "../db.js"
5 |
6 | export const createToolError = async (args: InsertToolError) => {
7 | const records = await db
8 | .insert(toolErrors)
9 | .values({
10 | ...insertToolErrorSchema.parse(args),
11 | createdAt: new Date(),
12 | })
13 | .returning()
14 |
15 | const record = records[0]
16 |
17 | if (!record) {
18 | throw new RecordNotCreatedError()
19 | }
20 |
21 | return record
22 | }
23 |
--------------------------------------------------------------------------------
/evals/packages/db/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@evals/typescript-config/base.json",
3 | "compilerOptions": {
4 | "types": ["vitest/globals"]
5 | },
6 | "include": ["src"],
7 | "exclude": ["node_modules"]
8 | }
9 |
--------------------------------------------------------------------------------
/evals/packages/db/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config"
2 |
3 | export default defineConfig({
4 | test: {
5 | globalSetup: ["./vitest.setup.ts"],
6 | },
7 | })
8 |
--------------------------------------------------------------------------------
/evals/packages/db/vitest.setup.ts:
--------------------------------------------------------------------------------
1 | import fs from "node:fs/promises"
2 | import path from "node:path"
3 |
4 | import { execa } from "execa"
5 |
6 | const TEST_DB_PATH = path.join(process.cwd(), "test.db")
7 |
8 | export default async function () {
9 | const exists = await fs.stat(TEST_DB_PATH).catch(() => false)
10 |
11 | if (exists) {
12 | await fs.unlink(TEST_DB_PATH)
13 | }
14 |
15 | await execa({
16 | env: { BENCHMARKS_DB_PATH: `file:${TEST_DB_PATH}` },
17 | })`pnpm db:push`
18 |
19 | process.env.BENCHMARKS_DB_PATH = `file:${TEST_DB_PATH}`
20 | }
21 |
--------------------------------------------------------------------------------
/evals/packages/ipc/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@evals/eslint-config/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/evals/packages/ipc/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@evals/ipc",
3 | "private": true,
4 | "type": "module",
5 | "exports": "./src/index.ts",
6 | "scripts": {
7 | "lint": "eslint src/**/*.ts --max-warnings=0",
8 | "check-types": "tsc --noEmit",
9 | "format": "prettier --write src"
10 | },
11 | "dependencies": {
12 | "@evals/types": "workspace:^",
13 | "node-ipc": "^12.0.0",
14 | "zod": "^3.24.2"
15 | },
16 | "devDependencies": {
17 | "@evals/eslint-config": "workspace:^",
18 | "@evals/typescript-config": "workspace:^",
19 | "@types/node-ipc": "^9.2.3"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/evals/packages/ipc/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./client.js"
2 | export * from "./server.js"
3 |
--------------------------------------------------------------------------------
/evals/packages/ipc/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@evals/typescript-config/base.json",
3 | "include": ["src"],
4 | "exclude": ["node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/evals/packages/lib/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@evals/eslint-config/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/evals/packages/lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@evals/lib",
3 | "private": true,
4 | "type": "module",
5 | "exports": "./src/index.ts",
6 | "scripts": {
7 | "lint": "eslint src/**/*.ts --max-warnings=0",
8 | "check-types": "tsc --noEmit",
9 | "test": "vitest --globals --run",
10 | "format": "prettier --write src"
11 | },
12 | "devDependencies": {
13 | "@evals/eslint-config": "workspace:^",
14 | "@evals/typescript-config": "workspace:^",
15 | "vitest": "^3.0.9"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/evals/packages/lib/src/__tests__/in-chunks-of.test.ts:
--------------------------------------------------------------------------------
1 | // npx vitest run src/__tests__/in-chunks-of.test.ts
2 |
3 | import { inChunksOf } from "../in-chunks-of.js"
4 |
5 | describe("inChunksOf", () => {
6 | it("should return an array of arrays", () => {
7 | const result = inChunksOf([1, 2, 3, 4, 5])
8 | expect(result).toEqual([[1, 2], [3, 4], [5]])
9 | })
10 |
11 | it("should return an array of arrays with a custom chunk size", () => {
12 | const result = inChunksOf([1, 2, 3, 4, 5], 3)
13 | expect(result).toEqual([
14 | [1, 2, 3],
15 | [4, 5],
16 | ])
17 | })
18 | })
19 |
--------------------------------------------------------------------------------
/evals/packages/lib/src/in-chunks-of.ts:
--------------------------------------------------------------------------------
1 | export function inChunksOf(ary: T[], perChunk = 2) {
2 | const result = ary.reduce((collect, item, index) => {
3 | const chunkIndex = Math.floor(index / perChunk)
4 |
5 | if (!collect[chunkIndex]) {
6 | collect[chunkIndex] = []
7 | }
8 |
9 | collect[chunkIndex].push(item)
10 | return collect
11 | }, [] as T[][])
12 |
13 | return result
14 | }
15 |
--------------------------------------------------------------------------------
/evals/packages/lib/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./in-chunks-of.js"
2 |
--------------------------------------------------------------------------------
/evals/packages/lib/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@evals/typescript-config/base.json",
3 | "compilerOptions": {
4 | "types": ["vitest/globals"]
5 | },
6 | "include": ["src"],
7 | "exclude": ["node_modules"]
8 | }
9 |
--------------------------------------------------------------------------------
/evals/packages/types/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@evals/eslint-config/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/evals/packages/types/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@evals/types",
3 | "private": true,
4 | "type": "module",
5 | "exports": "./src/index.ts",
6 | "scripts": {
7 | "lint": "eslint src/**/*.ts --max-warnings=0",
8 | "check-types": "tsc --noEmit",
9 | "format": "prettier --write src"
10 | },
11 | "dependencies": {
12 | "zod": "^3.24.2"
13 | },
14 | "devDependencies": {
15 | "@evals/eslint-config": "workspace:^",
16 | "@evals/typescript-config": "workspace:^"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/evals/packages/types/src/exercises.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * ExerciseLanguage
3 | */
4 |
5 | export const exerciseLanguages = ["go", "java", "javascript", "python", "rust"] as const
6 |
7 | export type ExerciseLanguage = (typeof exerciseLanguages)[number]
8 |
9 | export const isExerciseLanguage = (value: string): value is ExerciseLanguage =>
10 | exerciseLanguages.includes(value as ExerciseLanguage)
11 |
--------------------------------------------------------------------------------
/evals/packages/types/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./exercises.js"
2 | export * from "./ipc.js"
3 | export * from "./roo-code.js"
4 | export * from "./roo-code-defaults.js"
5 |
--------------------------------------------------------------------------------
/evals/packages/types/src/utils.ts:
--------------------------------------------------------------------------------
1 | export type Keys = keyof T
2 |
3 | export type Values = T[keyof T]
4 |
5 | export type Equals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? true : false
6 |
7 | export type AssertEqual = T
8 |
--------------------------------------------------------------------------------
/evals/packages/types/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@evals/typescript-config/base.json",
3 | "include": ["src"],
4 | "exclude": ["node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/evals/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - "config/*"
3 | - "apps/*"
4 | - "packages/*"
5 |
--------------------------------------------------------------------------------
/evals/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://turbo.build/schema.json",
3 | "globalDependencies": ["**/.env.*local"],
4 | "globalEnv": [
5 | "NODE_ENV",
6 | "NEXT_RUNTIME",
7 | "TASK_ID",
8 | "OPENROUTER_API_KEY",
9 | "OPENROUTER_MODEL_ID",
10 | "PROMPT_PATH",
11 | "WORKSPACE_PATH",
12 | "BENCHMARKS_DB_PATH",
13 | "TURSO_CONNECTION_URL",
14 | "TURSO_AUTH_TOKEN",
15 | "FOOTGUN_SYSTEM_PROMPT"
16 | ],
17 | "tasks": {
18 | "lint": {},
19 | "check-types": {},
20 | "test": {},
21 | "format": {},
22 | "dev": {
23 | "dependsOn": [],
24 | "cache": false,
25 | "persistent": true
26 | },
27 | "build": {
28 | "dependsOn": ["^build"],
29 | "outputs": [".next/**", "!.next/cache/**", "dist/**"]
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "Kilo Code development environment";
3 |
4 | inputs = {
5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
6 | };
7 |
8 | outputs = { self, nixpkgs, ... }: let
9 | systems = [ "aarch64-darwin" "x86_64-linux" ];
10 |
11 | forAllSystems = nixpkgs.lib.genAttrs systems;
12 |
13 | mkDevShell = system: let
14 | pkgs = import nixpkgs { inherit system; };
15 | in pkgs.mkShell {
16 | name = "kilo-code";
17 |
18 | packages = with pkgs; [
19 | nodejs_20
20 | corepack_20
21 | ];
22 | };
23 | in {
24 | devShells = forAllSystems (system: {
25 | default = mkDevShell system;
26 | });
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/kilo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/kilo.gif
--------------------------------------------------------------------------------
/knip.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/knip@latest/schema.json",
3 | "entry": ["src/extension.ts", "src/activate/index.ts", "webview-ui/src/index.tsx"],
4 | "project": ["src/**/*.ts", "webview-ui/src/**/*.{ts,tsx}"],
5 | "ignore": [
6 | "**/__mocks__/**",
7 | "**/__tests__/**",
8 | "**/test/**",
9 | "**/*.test.ts",
10 | "**/*.test.tsx",
11 | "**/stories/**",
12 | "bin/**",
13 | "apps/vscode-e2e/**",
14 | "evals/**",
15 | "src/extension/**",
16 | "src/activate/**",
17 | "src/workers/**",
18 | "src/schemas/ipc.ts",
19 | "src/extension.ts",
20 | "scripts/**",
21 | "vitest.config.ts"
22 | ],
23 | "workspaces": {
24 | "webview-ui": {
25 | "entry": ["src/index.tsx"],
26 | "project": ["src/**/*.{ts,tsx}"]
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/packages/build/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@roo-code/config-eslint/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/packages/build/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@roo-code/build",
3 | "description": "ESBuild utilities for Roo Code.",
4 | "private": true,
5 | "type": "module",
6 | "main": "./dist/index.js",
7 | "types": "./src/index.ts",
8 | "scripts": {
9 | "lint": "eslint src --ext=ts --max-warnings=0",
10 | "check-types": "tsc --noEmit",
11 | "test": "vitest run",
12 | "build": "tsc",
13 | "clean": "rimraf dist .turbo"
14 | },
15 | "dependencies": {
16 | "zod": "^3.24.2"
17 | },
18 | "devDependencies": {
19 | "@roo-code/config-eslint": "workspace:^",
20 | "@roo-code/config-typescript": "workspace:^",
21 | "@types/node": "^22.15.20",
22 | "vitest": "^3.1.3"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/build/src/git.ts:
--------------------------------------------------------------------------------
1 | import { execSync } from "child_process"
2 |
3 | export function getGitSha() {
4 | let gitSha: string | undefined = undefined
5 |
6 | try {
7 | gitSha = execSync("git rev-parse HEAD").toString().trim()
8 | } catch (_e) {
9 | // Do nothing.
10 | }
11 |
12 | return gitSha
13 | }
14 |
--------------------------------------------------------------------------------
/packages/build/src/index.ts:
--------------------------------------------------------------------------------
1 | export { getGitSha } from "./git.js"
2 | export { copyPaths, copyWasms, copyLocales, setupLocaleWatcher, generatePackageJson } from "./esbuild.js"
3 |
--------------------------------------------------------------------------------
/packages/build/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@roo-code/config-typescript/base.json",
3 | "compilerOptions": {
4 | "types": ["vitest/globals"],
5 | "outDir": "dist"
6 | },
7 | "include": ["src"],
8 | "exclude": ["node_modules"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/build/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config"
2 |
3 | export default defineConfig({
4 | test: {
5 | globals: true,
6 | environment: "node",
7 | },
8 | })
9 |
--------------------------------------------------------------------------------
/packages/cloud/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@roo-code/config-eslint/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/packages/cloud/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@roo-code/cloud",
3 | "description": "Roo Code Cloud VSCode integration.",
4 | "version": "0.0.0",
5 | "type": "module",
6 | "exports": "./src/index.ts",
7 | "scripts": {
8 | "lint": "eslint src --ext=ts --max-warnings=0",
9 | "check-types": "tsc --noEmit",
10 | "test": "vitest run",
11 | "clean": "rimraf dist .turbo"
12 | },
13 | "dependencies": {
14 | "@roo-code/telemetry": "workspace:^",
15 | "@roo-code/types": "workspace:^",
16 | "axios": "^1.7.4",
17 | "zod": "^3.24.2"
18 | },
19 | "devDependencies": {
20 | "@roo-code/config-eslint": "workspace:^",
21 | "@roo-code/config-typescript": "workspace:^",
22 | "@types/node": "^22.15.20",
23 | "@types/vscode": "^1.84.0",
24 | "vitest": "^3.1.3"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/cloud/src/Config.ts:
--------------------------------------------------------------------------------
1 | export const getClerkBaseUrl = () => process.env.CLERK_BASE_URL || "https://clerk.roocode.com"
2 | export const getRooCodeApiUrl = () => process.env.ROO_CODE_API_URL || "https://app.roocode.com"
3 |
--------------------------------------------------------------------------------
/packages/cloud/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./CloudService"
2 |
--------------------------------------------------------------------------------
/packages/cloud/src/types.ts:
--------------------------------------------------------------------------------
1 | export interface CloudServiceCallbacks {
2 | stateChanged?: () => void
3 | }
4 |
--------------------------------------------------------------------------------
/packages/cloud/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@roo-code/config-typescript/vscode-library.json",
3 | "include": ["src"],
4 | "exclude": ["node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/cloud/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config"
2 |
3 | export default defineConfig({
4 | test: {
5 | globals: true,
6 | environment: "node",
7 | },
8 | resolve: {
9 | alias: {
10 | vscode: new URL("./src/__mocks__/vscode.ts", import.meta.url).pathname,
11 | },
12 | },
13 | })
14 |
--------------------------------------------------------------------------------
/packages/config-eslint/next.js:
--------------------------------------------------------------------------------
1 | import pluginNext from "@next/eslint-plugin-next"
2 |
3 | import { reactConfig } from "./react.js"
4 |
5 | /**
6 | * @type {import("eslint").Linter.Config[]}
7 | */
8 | export const nextJsConfig = [
9 | ...reactConfig,
10 | {
11 | plugins: {
12 | "@next/next": pluginNext,
13 | },
14 | rules: {
15 | ...pluginNext.configs.recommended.rules,
16 | ...pluginNext.configs["core-web-vitals"].rules,
17 | },
18 | },
19 | ]
20 |
--------------------------------------------------------------------------------
/packages/config-eslint/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@roo-code/config-eslint",
3 | "private": true,
4 | "type": "module",
5 | "exports": {
6 | "./base": "./base.js",
7 | "./react": "./react.js",
8 | "./next-js": "./next.js"
9 | },
10 | "devDependencies": {
11 | "@eslint/js": "^9.22.0",
12 | "@next/eslint-plugin-next": "^15.2.1",
13 | "eslint": "^9.27.0",
14 | "eslint-config-prettier": "^10.1.1",
15 | "eslint-plugin-only-warn": "^1.1.0",
16 | "eslint-plugin-react": "^7.37.4",
17 | "eslint-plugin-react-hooks": "^5.2.0",
18 | "eslint-plugin-turbo": "^2.4.4",
19 | "globals": "^16.0.0",
20 | "typescript-eslint": "^8.26.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/config-typescript/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "declarationMap": true,
6 | "esModuleInterop": true,
7 | "incremental": false,
8 | "isolatedModules": true,
9 | "lib": ["es2022", "DOM", "DOM.Iterable"],
10 | "module": "NodeNext",
11 | "moduleDetection": "force",
12 | "moduleResolution": "NodeNext",
13 | "noUncheckedIndexedAccess": true,
14 | "resolveJsonModule": true,
15 | "skipLibCheck": true,
16 | "strict": true,
17 | "target": "ES2022"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/config-typescript/cjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "compilerOptions": {
4 | "module": "CommonJS",
5 | "moduleResolution": "Node",
6 | "esModuleInterop": true,
7 | "target": "ES2022",
8 | "lib": ["ES2022", "ESNext.Disposable", "DOM"],
9 | "sourceMap": true,
10 | "strict": true,
11 | "skipLibCheck": true,
12 | "useUnknownInCatchVariables": false
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/config-typescript/nextjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "extends": "./base.json",
4 | "compilerOptions": {
5 | "plugins": [{ "name": "next" }],
6 | "module": "ESNext",
7 | "moduleResolution": "bundler",
8 | "allowJs": true,
9 | "jsx": "preserve",
10 | "noEmit": true
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/config-typescript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@roo-code/config-typescript",
3 | "private": true,
4 | "publishConfig": {
5 | "access": "public"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/config-typescript/vscode-library.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "extends": "./base.json",
4 | "compilerOptions": {
5 | "types": ["vitest/globals"],
6 | "outDir": "dist",
7 | "module": "esnext",
8 | "moduleResolution": "Bundler",
9 | "noUncheckedIndexedAccess": false,
10 | "useUnknownInCatchVariables": false
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/telemetry/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@roo-code/config-eslint/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/packages/telemetry/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@roo-code/telemetry",
3 | "description": "Roo Code telemetry service and clients.",
4 | "version": "0.0.0",
5 | "type": "module",
6 | "exports": "./src/index.ts",
7 | "scripts": {
8 | "lint": "eslint src --ext=ts --max-warnings=0",
9 | "check-types": "tsc --noEmit",
10 | "test": "vitest run",
11 | "clean": "rimraf dist .turbo"
12 | },
13 | "dependencies": {
14 | "@roo-code/types": "workspace:^",
15 | "posthog-node": "^4.7.0",
16 | "zod": "^3.24.2"
17 | },
18 | "devDependencies": {
19 | "@roo-code/config-eslint": "workspace:^",
20 | "@roo-code/config-typescript": "workspace:^",
21 | "@types/node": "^22.15.20",
22 | "@types/vscode": "^1.84.0",
23 | "vitest": "^3.1.3"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/telemetry/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./BaseTelemetryClient"
2 | export * from "./PostHogTelemetryClient"
3 | export * from "./TelemetryService"
4 |
--------------------------------------------------------------------------------
/packages/telemetry/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@roo-code/config-typescript/vscode-library.json",
3 | "include": ["src"],
4 | "exclude": ["node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/telemetry/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config"
2 |
3 | export default defineConfig({
4 | test: {
5 | globals: true,
6 | environment: "node",
7 | },
8 | })
9 |
--------------------------------------------------------------------------------
/packages/types/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { config } from "@roo-code/config-eslint/base"
2 |
3 | /** @type {import("eslint").Linter.Config} */
4 | export default [...config]
5 |
--------------------------------------------------------------------------------
/packages/types/src/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | // npx vitest run src/__tests__/index.test.ts
2 |
3 | import { GLOBAL_STATE_KEYS } from "../index.js"
4 |
5 | describe("GLOBAL_STATE_KEYS", () => {
6 | it("should contain provider settings keys", () => {
7 | expect(GLOBAL_STATE_KEYS).toContain("autoApprovalEnabled")
8 | })
9 |
10 | it("should contain provider settings keys", () => {
11 | expect(GLOBAL_STATE_KEYS).toContain("anthropicBaseUrl")
12 | })
13 |
14 | it("should not contain secret state keys", () => {
15 | expect(GLOBAL_STATE_KEYS).not.toContain("openRouterApiKey")
16 | })
17 | })
18 |
--------------------------------------------------------------------------------
/packages/types/src/history.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod"
2 |
3 | /**
4 | * HistoryItem
5 | */
6 |
7 | export const historyItemSchema = z.object({
8 | id: z.string(),
9 | number: z.number(),
10 | ts: z.number(),
11 | task: z.string(),
12 | tokensIn: z.number(),
13 | tokensOut: z.number(),
14 | cacheWrites: z.number().optional(),
15 | cacheReads: z.number().optional(),
16 | totalCost: z.number(),
17 | size: z.number().optional(),
18 | workspace: z.string().optional(),
19 | })
20 |
21 | export type HistoryItem = z.infer
22 |
--------------------------------------------------------------------------------
/packages/types/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./providers/index.js"
2 |
3 | export * from "./api.js"
4 | export * from "./codebase-index.js"
5 | export * from "./cloud.js"
6 | export * from "./experiment.js"
7 | export * from "./global-settings.js"
8 | export * from "./history.js"
9 | export * from "./ipc.js"
10 | export * from "./message.js"
11 | export * from "./mode.js"
12 | export * from "./model.js"
13 | export * from "./provider-settings.js"
14 | export * from "./telemetry.js"
15 | export * from "./terminal.js"
16 | export * from "./tool.js"
17 | export * from "./type-fu.js"
18 | export * from "./vscode.js"
19 |
--------------------------------------------------------------------------------
/packages/types/src/providers/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./anthropic.js"
2 | export * from "./bedrock.js"
3 | export * from "./chutes.js"
4 | export * from "./deepseek.js"
5 | export * from "./gemini.js"
6 | export * from "./glama.js"
7 | export * from "./groq.js"
8 | export * from "./lite-llm.js"
9 | export * from "./lm-studio.js"
10 | export * from "./mistral.js"
11 | export * from "./openai.js"
12 | export * from "./openrouter.js"
13 | export * from "./requesty.js"
14 | export * from "./unbound.js"
15 | export * from "./vertex.js"
16 | export * from "./vscode-llm.js"
17 | export * from "./xai.js"
18 |
--------------------------------------------------------------------------------
/packages/types/src/providers/lm-studio.ts:
--------------------------------------------------------------------------------
1 | export const LMSTUDIO_DEFAULT_TEMPERATURE = 0
2 |
--------------------------------------------------------------------------------
/packages/types/src/providers/requesty.ts:
--------------------------------------------------------------------------------
1 | import type { ModelInfo } from "../model.js"
2 |
3 | // Requesty
4 | // https://requesty.ai/router-2
5 | export const requestyDefaultModelId = "coding/claude-4-sonnet"
6 |
7 | export const requestyDefaultModelInfo: ModelInfo = {
8 | maxTokens: 8192,
9 | contextWindow: 200_000,
10 | supportsImages: true,
11 | supportsComputerUse: true,
12 | supportsPromptCache: true,
13 | inputPrice: 3.0,
14 | outputPrice: 15.0,
15 | cacheWritesPrice: 3.75,
16 | cacheReadsPrice: 0.3,
17 | description:
18 | "The best coding model, optimized by Requesty, and automatically routed to the fastest provider. Claude 4 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities.",
19 | }
20 |
--------------------------------------------------------------------------------
/packages/types/src/providers/unbound.ts:
--------------------------------------------------------------------------------
1 | import type { ModelInfo } from "../model.js"
2 |
3 | export const unboundDefaultModelId = "anthropic/claude-3-7-sonnet-20250219"
4 |
5 | export const unboundDefaultModelInfo: ModelInfo = {
6 | maxTokens: 8192,
7 | contextWindow: 200_000,
8 | supportsImages: true,
9 | supportsPromptCache: true,
10 | inputPrice: 3.0,
11 | outputPrice: 15.0,
12 | cacheWritesPrice: 3.75,
13 | cacheReadsPrice: 0.3,
14 | }
15 |
--------------------------------------------------------------------------------
/packages/types/src/terminal.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod"
2 |
3 | /**
4 | * CommandExecutionStatus
5 | */
6 |
7 | export const commandExecutionStatusSchema = z.discriminatedUnion("status", [
8 | z.object({
9 | executionId: z.string(),
10 | status: z.literal("started"),
11 | pid: z.number().optional(),
12 | command: z.string(),
13 | }),
14 | z.object({
15 | executionId: z.string(),
16 | status: z.literal("output"),
17 | output: z.string(),
18 | }),
19 | z.object({
20 | executionId: z.string(),
21 | status: z.literal("exited"),
22 | exitCode: z.number().optional(),
23 | }),
24 | z.object({
25 | executionId: z.string(),
26 | status: z.literal("fallback"),
27 | }),
28 | ])
29 |
30 | export type CommandExecutionStatus = z.infer
31 |
--------------------------------------------------------------------------------
/packages/types/src/type-fu.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * TS
3 | */
4 |
5 | export type Keys = keyof T
6 |
7 | export type Values = T[keyof T]
8 |
9 | export type Equals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? true : false
10 |
11 | export type AssertEqual = T
12 |
13 | /**
14 | * Creates a type-safe keys array that enforces ALL keys from type T are present.
15 | * Returns a compile-time error if any keys are missing or extra keys are provided.
16 | */
17 | export function keysOf() {
18 | return (
19 | keys: keyof T extends U[number] ? (U[number] extends keyof T ? U : never) : never,
20 | ): U => keys
21 | }
22 |
--------------------------------------------------------------------------------
/packages/types/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@roo-code/config-typescript/base.json",
3 | "compilerOptions": {
4 | "types": ["vitest/globals"],
5 | "outDir": "dist"
6 | },
7 | "include": ["src"],
8 | "exclude": ["node_modules"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/types/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tsup"
2 |
3 | export default defineConfig({
4 | entry: ["src/index.ts"],
5 | format: ["cjs", "esm"],
6 | dts: true,
7 | clean: false,
8 | splitting: false,
9 | sourcemap: true,
10 | outDir: "dist",
11 | })
12 |
--------------------------------------------------------------------------------
/packages/types/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config"
2 |
3 | export default defineConfig({
4 | test: {
5 | globals: true,
6 | },
7 | })
8 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - src
3 | - webview-ui
4 | - apps/*
5 | - packages/*
6 |
7 | onlyBuiltDependencies:
8 | - '@tailwindcss/oxide'
9 | - '@vscode/vsce-sign'
10 | - core-js
11 | - esbuild
12 | - keytar
13 | - puppeteer-chromium-resolver
14 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": ["config:recommended"],
4 | "forkProcessing": "enabled",
5 | "ignoreDeps": ["@vscode/vsce"]
6 | }
7 |
--------------------------------------------------------------------------------
/scripts/reset-kilocode-state.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Kilocode state is being reset. This probably doesn't work while VS Code is running."
4 |
5 | # Reset the secrets:
6 | sqlite3 ~/Library/Application\ Support/Code/User/globalStorage/state.vscdb \
7 | "DELETE FROM ItemTable WHERE \
8 | key = 'kilocode.kilo-code' OR \
9 | key LIKE 'workbench.view.extension.kilo-code%' OR \
10 | key LIKE 'secret://{\"extensionId\":\"kilocode.kilo-code\",%';"
11 |
12 | # delete all kilocode state files:
13 | rm -rf ~/Library/Application\ Support/Code/User/globalStorage/kilocode.kilo-code/
14 |
15 | # clear some of the vscode cache that I've observed contains kilocode related entries:
16 | rm ~/Library/Application\ Support/Code/CachedProfilesData/__default__profile__/extensions.user.cache
17 |
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | README.md
2 | CHANGELOG.md
3 | LICENSE
4 | webview-ui
5 | assets/vscode-material-icons
6 |
--------------------------------------------------------------------------------
/src/.prettierignore:
--------------------------------------------------------------------------------
1 | dist/
2 | webview-ui/
3 |
--------------------------------------------------------------------------------
/src/.vscodeignore:
--------------------------------------------------------------------------------
1 | # Exclude everything
2 | **
3 |
4 | # Include README.md, CHANGELOG.md and LICENSE
5 | !README.md
6 | !CHANGELOG.md
7 | !LICENSE
8 |
9 | # Include package.json
10 | !package.json
11 | !package.nls.*
12 |
13 | # Include the built extension
14 | !dist
15 |
16 | # Include the built webview
17 | **/*.map
18 | !webview-ui/audio
19 | !webview-ui/build/assets/*.js
20 | !webview-ui/build/assets/*.ttf
21 | !webview-ui/build/assets/*.css
22 |
23 | # Include default themes JSON files used in getTheme
24 | !integrations/theme/default-themes/**
25 |
26 | # Include icons and images
27 | !assets/codicons/**
28 | !assets/vscode-material-icons/**
29 | !assets/icons/**
30 | !assets/images/**
31 |
32 | # Include .env file for telemetry
33 | !.env
34 |
--------------------------------------------------------------------------------
/src/__mocks__/@modelcontextprotocol/sdk/client/index.js:
--------------------------------------------------------------------------------
1 | class Client {
2 | constructor() {
3 | this.request = jest.fn()
4 | }
5 |
6 | connect() {
7 | return Promise.resolve()
8 | }
9 |
10 | close() {
11 | return Promise.resolve()
12 | }
13 | }
14 |
15 | module.exports = {
16 | Client,
17 | }
18 |
--------------------------------------------------------------------------------
/src/__mocks__/@modelcontextprotocol/sdk/client/sse.js:
--------------------------------------------------------------------------------
1 | class SSEClientTransport {
2 | constructor(url, options = {}) {
3 | this.url = url
4 | this.options = options
5 | this.onerror = null
6 | this.connect = jest.fn().mockResolvedValue()
7 | this.close = jest.fn().mockResolvedValue()
8 | this.start = jest.fn().mockResolvedValue()
9 | }
10 | }
11 |
12 | module.exports = {
13 | SSEClientTransport,
14 | }
15 |
--------------------------------------------------------------------------------
/src/__mocks__/@modelcontextprotocol/sdk/client/stdio.js:
--------------------------------------------------------------------------------
1 | class StdioClientTransport {
2 | constructor() {
3 | this.start = jest.fn().mockResolvedValue(undefined)
4 | this.close = jest.fn().mockResolvedValue(undefined)
5 | this.stderr = {
6 | on: jest.fn(),
7 | }
8 | }
9 | }
10 |
11 | class StdioServerParameters {
12 | constructor() {
13 | this.command = ""
14 | this.args = []
15 | this.env = {}
16 | }
17 | }
18 |
19 | module.exports = {
20 | StdioClientTransport,
21 | StdioServerParameters,
22 | }
23 |
--------------------------------------------------------------------------------
/src/__mocks__/@modelcontextprotocol/sdk/client/streamableHttp.js:
--------------------------------------------------------------------------------
1 | class StreamableHTTPClientTransport {
2 | constructor(url, options = {}) {
3 | this.url = url
4 | this.options = options
5 | this.onerror = null
6 | this.onclose = null
7 | this.connect = jest.fn().mockResolvedValue()
8 | this.close = jest.fn().mockResolvedValue()
9 | this.start = jest.fn().mockResolvedValue()
10 | }
11 | }
12 |
13 | module.exports = {
14 | StreamableHTTPClientTransport,
15 | }
16 |
--------------------------------------------------------------------------------
/src/__mocks__/@modelcontextprotocol/sdk/index.js:
--------------------------------------------------------------------------------
1 | const { Client } = require("./client/index.js")
2 | const { StdioClientTransport, StdioServerParameters } = require("./client/stdio.js")
3 | const {
4 | CallToolResultSchema,
5 | ListToolsResultSchema,
6 | ListResourcesResultSchema,
7 | ListResourceTemplatesResultSchema,
8 | ReadResourceResultSchema,
9 | ErrorCode,
10 | McpError,
11 | } = require("./types.js")
12 |
13 | module.exports = {
14 | Client,
15 | StdioClientTransport,
16 | StdioServerParameters,
17 | CallToolResultSchema,
18 | ListToolsResultSchema,
19 | ListResourcesResultSchema,
20 | ListResourceTemplatesResultSchema,
21 | ReadResourceResultSchema,
22 | ErrorCode,
23 | McpError,
24 | }
25 |
--------------------------------------------------------------------------------
/src/__mocks__/McpHub.ts:
--------------------------------------------------------------------------------
1 | export class McpHub {
2 | connections = []
3 | isConnecting = false
4 |
5 | constructor() {
6 | this.toggleToolAlwaysAllow = jest.fn()
7 | this.callTool = jest.fn()
8 | }
9 |
10 | async toggleToolAlwaysAllow(_serverName: string, _toolName: string, _shouldAllow: boolean): Promise {
11 | return Promise.resolve()
12 | }
13 |
14 | async callTool(_serverName: string, _toolName: string, _toolArguments?: Record): Promise {
15 | return Promise.resolve({ result: "success" })
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/__mocks__/default-shell.js:
--------------------------------------------------------------------------------
1 | // Mock default shell based on platform
2 | const os = require("os")
3 |
4 | let defaultShell
5 | if (os.platform() === "win32") {
6 | defaultShell = "cmd.exe"
7 | } else {
8 | defaultShell = "/bin/bash"
9 | }
10 |
11 | module.exports = defaultShell
12 | module.exports.default = defaultShell
13 |
--------------------------------------------------------------------------------
/src/__mocks__/delay.js:
--------------------------------------------------------------------------------
1 | function delay(ms) {
2 | return new Promise((resolve) => setTimeout(resolve, ms))
3 | }
4 |
5 | module.exports = delay
6 | module.exports.default = delay
7 |
--------------------------------------------------------------------------------
/src/__mocks__/execa.js:
--------------------------------------------------------------------------------
1 | // Mock implementation of execa
2 | const mockExeca = jest.fn().mockImplementation((command, args) => {
3 | return Promise.resolve({
4 | stdout: `Mocked execution of: ${command} ${args ? args.join(" ") : ""}`,
5 | stderr: "",
6 | exitCode: 0,
7 | })
8 | })
9 |
10 | mockExeca.sync = jest.fn().mockImplementation((command, args) => {
11 | return {
12 | stdout: `Mocked sync execution of: ${command} ${args ? args.join(" ") : ""}`,
13 | stderr: "",
14 | exitCode: 0,
15 | }
16 | })
17 |
18 | module.exports = {
19 | execa: mockExeca,
20 | execaSync: mockExeca.sync,
21 | }
22 |
--------------------------------------------------------------------------------
/src/__mocks__/get-folder-size.js:
--------------------------------------------------------------------------------
1 | module.exports = async function getFolderSize() {
2 | return {
3 | size: 1000,
4 | errors: [],
5 | }
6 | }
7 |
8 | module.exports.loose = async function getFolderSizeLoose() {
9 | return {
10 | size: 1000,
11 | errors: [],
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/__mocks__/os-name.js:
--------------------------------------------------------------------------------
1 | function osName() {
2 | return "macOS"
3 | }
4 |
5 | module.exports = osName
6 | module.exports.default = osName
7 |
--------------------------------------------------------------------------------
/src/__mocks__/p-limit.js:
--------------------------------------------------------------------------------
1 | // Mock implementation of p-limit for Jest tests
2 | // p-limit is a utility for limiting the number of concurrent promises
3 |
4 | const pLimit = (concurrency) => {
5 | // Return a function that just executes the passed function immediately
6 | // In tests, we don't need actual concurrency limiting
7 | return (fn) => {
8 | if (typeof fn === "function") {
9 | return fn()
10 | }
11 | return fn
12 | }
13 | }
14 |
15 | // Set default export
16 | pLimit.default = pLimit
17 |
18 | module.exports = pLimit
19 |
--------------------------------------------------------------------------------
/src/__mocks__/p-wait-for.js:
--------------------------------------------------------------------------------
1 | function pWaitFor(condition, options = {}) {
2 | return new Promise((resolve, reject) => {
3 | let timeout
4 |
5 | const interval = setInterval(() => {
6 | if (condition()) {
7 | if (timeout) {
8 | clearTimeout(timeout)
9 | }
10 |
11 | clearInterval(interval)
12 | resolve()
13 | }
14 | }, options.interval || 20)
15 |
16 | if (options.timeout) {
17 | timeout = setTimeout(() => {
18 | clearInterval(interval)
19 | reject(new Error("Timed out"))
20 | }, options.timeout)
21 | }
22 | })
23 | }
24 |
25 | module.exports = pWaitFor
26 | module.exports.default = pWaitFor
27 |
--------------------------------------------------------------------------------
/src/__mocks__/serialize-error.js:
--------------------------------------------------------------------------------
1 | function serializeError(error) {
2 | if (error instanceof Error) {
3 | return {
4 | name: error.name,
5 | message: error.message,
6 | stack: error.stack,
7 | }
8 | }
9 | return error
10 | }
11 |
12 | function deserializeError(errorData) {
13 | if (errorData && typeof errorData === "object") {
14 | const error = new Error(errorData.message)
15 | error.name = errorData.name
16 | error.stack = errorData.stack
17 | return error
18 | }
19 | return errorData
20 | }
21 |
22 | module.exports = {
23 | serializeError,
24 | deserializeError,
25 | }
26 |
--------------------------------------------------------------------------------
/src/__mocks__/strip-ansi.js:
--------------------------------------------------------------------------------
1 | function stripAnsi(string) {
2 | // Simple mock that just returns the input string
3 | return string
4 | }
5 |
6 | module.exports = stripAnsi
7 | module.exports.default = stripAnsi
8 |
--------------------------------------------------------------------------------
/src/__mocks__/strip-bom.js:
--------------------------------------------------------------------------------
1 | // Mock implementation of strip-bom
2 | module.exports = function stripBom(string) {
3 | if (typeof string !== "string") {
4 | throw new TypeError("Expected a string")
5 | }
6 |
7 | // Removes UTF-8 BOM
8 | if (string.charCodeAt(0) === 0xfeff) {
9 | return string.slice(1)
10 | }
11 |
12 | return string
13 | }
14 |
--------------------------------------------------------------------------------
/src/activate/handleTask.ts:
--------------------------------------------------------------------------------
1 | import * as vscode from "vscode"
2 |
3 | import { Package } from "../shared/package"
4 | import { ClineProvider } from "../core/webview/ClineProvider"
5 | import { t } from "../i18n"
6 |
7 | export const handleNewTask = async (params: { prompt?: string } | null | undefined) => {
8 | let prompt = params?.prompt
9 |
10 | if (!prompt) {
11 | prompt = await vscode.window.showInputBox({
12 | prompt: t("common:input.task_prompt"),
13 | placeHolder: t("common:input.task_placeholder"),
14 | })
15 | }
16 |
17 | if (!prompt) {
18 | await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`)
19 | return
20 | }
21 |
22 | await ClineProvider.handleCodeAction("newTask", "NEW_TASK", { userInput: prompt })
23 | }
24 |
--------------------------------------------------------------------------------
/src/activate/index.ts:
--------------------------------------------------------------------------------
1 | export { handleUri } from "./handleUri"
2 | export { registerCommands } from "./registerCommands"
3 | export { registerCodeActions } from "./registerCodeActions"
4 | export { registerTerminalActions } from "./registerTerminalActions"
5 | export { CodeActionProvider } from "./CodeActionProvider"
6 |
--------------------------------------------------------------------------------
/src/api/providers/chutes.ts:
--------------------------------------------------------------------------------
1 | import { type ChutesModelId, chutesDefaultModelId, chutesModels } from "@roo-code/types"
2 |
3 | import type { ApiHandlerOptions } from "../../shared/api"
4 |
5 | import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"
6 |
7 | export class ChutesHandler extends BaseOpenAiCompatibleProvider {
8 | constructor(options: ApiHandlerOptions) {
9 | super({
10 | ...options,
11 | providerName: "Chutes",
12 | baseURL: "https://llm.chutes.ai/v1",
13 | apiKey: options.chutesApiKey,
14 | defaultProviderModelId: chutesDefaultModelId,
15 | providerModels: chutesModels,
16 | defaultTemperature: 0.5,
17 | })
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/api/providers/constants.ts:
--------------------------------------------------------------------------------
1 | export const DEFAULT_HEADERS = {
2 | "HTTP-Referer": "https://kilocode.ai",
3 | "X-Title": "Kilo Code",
4 | }
5 |
--------------------------------------------------------------------------------
/src/api/providers/groq.ts:
--------------------------------------------------------------------------------
1 | import { type GroqModelId, groqDefaultModelId, groqModels } from "@roo-code/types"
2 |
3 | import type { ApiHandlerOptions } from "../../shared/api"
4 |
5 | import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"
6 |
7 | export class GroqHandler extends BaseOpenAiCompatibleProvider {
8 | constructor(options: ApiHandlerOptions) {
9 | super({
10 | ...options,
11 | providerName: "Groq",
12 | baseURL: "https://api.groq.com/openai/v1",
13 | apiKey: options.groqApiKey,
14 | defaultProviderModelId: groqDefaultModelId,
15 | providerModels: groqModels,
16 | defaultTemperature: 0.5,
17 | })
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/api/transform/stream.ts:
--------------------------------------------------------------------------------
1 | export type ApiStream = AsyncGenerator
2 |
3 | export type ApiStreamChunk = ApiStreamTextChunk | ApiStreamUsageChunk | ApiStreamReasoningChunk
4 |
5 | export interface ApiStreamTextChunk {
6 | type: "text"
7 | text: string
8 | }
9 |
10 | export interface ApiStreamReasoningChunk {
11 | type: "reasoning"
12 | text: string
13 | }
14 |
15 | export interface ApiStreamUsageChunk {
16 | type: "usage"
17 | inputTokens: number
18 | outputTokens: number
19 | cacheWriteTokens?: number
20 | cacheReadTokens?: number
21 | reasoningTokens?: number
22 | totalCost?: number
23 | }
24 |
--------------------------------------------------------------------------------
/src/assets/codicons/codicon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/assets/codicons/codicon.ttf
--------------------------------------------------------------------------------
/src/assets/docs/demo.gif:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:a27ab29e2b5cf8ae65efd35222d456de4b9b1956b159705f9ead3d19426fabae
3 | size 7456839
4 |
--------------------------------------------------------------------------------
/src/assets/icons/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/assets/icons/icon.png
--------------------------------------------------------------------------------
/src/assets/icons/kilo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/assets/icons/kilo.png
--------------------------------------------------------------------------------
/src/assets/icons/logo-outline-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/assets/icons/logo-outline-black.png
--------------------------------------------------------------------------------
/src/assets/images/openrouter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/assets/images/openrouter.png
--------------------------------------------------------------------------------
/src/assets/images/requesty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/assets/images/requesty.png
--------------------------------------------------------------------------------
/src/core/assistant-message/index.ts:
--------------------------------------------------------------------------------
1 | export { type AssistantMessageContent, parseAssistantMessage } from "./parseAssistantMessage"
2 | export { presentAssistantMessage } from "./presentAssistantMessage"
3 |
--------------------------------------------------------------------------------
/src/core/prompts/__tests__/utils.ts:
--------------------------------------------------------------------------------
1 | import * as fs from "fs/promises"
2 | import { PathLike } from "fs"
3 |
4 | // Make a path take a unix-like form. Useful for making path comparisons.
5 | export function toPosix(filePath: PathLike | fs.FileHandle) {
6 | return filePath.toString().toPosix()
7 | }
8 |
--------------------------------------------------------------------------------
/src/core/prompts/sections/index.ts:
--------------------------------------------------------------------------------
1 | export { getRulesSection } from "./rules"
2 | export { getSystemInfoSection } from "./system-info"
3 | export { getObjectiveSection } from "./objective"
4 | export { addCustomInstructions } from "./custom-instructions"
5 | export { getSharedToolUseSection } from "./tool-use"
6 | export { getMcpServersSection } from "./mcp-servers"
7 | export { getToolUseGuidelinesSection } from "./tool-use-guidelines"
8 | export { getCapabilitiesSection } from "./capabilities"
9 | export { getModesSection } from "./modes"
10 | export { markdownFormattingSection } from "./markdown-formatting"
11 |
--------------------------------------------------------------------------------
/src/core/prompts/sections/markdown-formatting.ts:
--------------------------------------------------------------------------------
1 | export function markdownFormattingSection(): string {
2 | return `====
3 |
4 | MARKDOWN RULES
5 |
6 | ALL responses MUST show ANY \`language construct\` OR filename reference as clickable, exactly as [\`filename OR language.declaration()\`](relative/file/path.ext:line); line is required for \`syntax\` and optional for filename links. This applies to ALL markdown responses and ALSO those in `
7 | }
8 |
--------------------------------------------------------------------------------
/src/core/prompts/tools/fetch-instructions.ts:
--------------------------------------------------------------------------------
1 | export function getFetchInstructionsDescription(): string {
2 | return `## fetch_instructions
3 | Description: Request to fetch instructions to perform a task
4 | Parameters:
5 | - task: (required) The task to get instructions for. This can take the following values:
6 | create_mcp_server
7 | create_mode
8 |
9 | Example: Requesting instructions to create an MCP Server
10 |
11 |
12 | create_mcp_server
13 | `
14 | }
15 |
--------------------------------------------------------------------------------
/src/core/prompts/tools/new-task.ts:
--------------------------------------------------------------------------------
1 | import { ToolArgs } from "./types"
2 |
3 | export function getNewTaskDescription(_args: ToolArgs): string {
4 | return `## new_task
5 | Description: This will let you create a new task instance in the chosen mode using your provided message.
6 |
7 | Parameters:
8 | - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect").
9 | - message: (required) The initial user message or instructions for this new task.
10 |
11 | Usage:
12 |
13 | your-mode-slug-here
14 | Your initial instructions here
15 |
16 |
17 | Example:
18 |
19 | code
20 | Implement a new feature for the application.
21 |
22 | `
23 | }
24 |
--------------------------------------------------------------------------------
/src/core/prompts/tools/switch-mode.ts:
--------------------------------------------------------------------------------
1 | export function getSwitchModeDescription(): string {
2 | return `## switch_mode
3 | Description: Request to switch to a different mode. This tool allows modes to request switching to another mode when needed, such as switching to Code mode to make code changes. The user must approve the mode switch.
4 | Parameters:
5 | - mode_slug: (required) The slug of the mode to switch to (e.g., "code", "ask", "architect")
6 | - reason: (optional) The reason for switching modes
7 | Usage:
8 |
9 | Mode slug here
10 | Reason for switching here
11 |
12 |
13 | Example: Requesting to switch to code mode
14 |
15 | code
16 | Need to make code changes
17 | `
18 | }
19 |
--------------------------------------------------------------------------------
/src/core/prompts/tools/types.ts:
--------------------------------------------------------------------------------
1 | import { DiffStrategy } from "../../../shared/tools"
2 | import { McpHub } from "../../../services/mcp/McpHub"
3 |
4 | export type ToolArgs = {
5 | cwd: string
6 | supportsComputerUse: boolean
7 | diffStrategy?: DiffStrategy
8 | browserViewportSize?: string
9 | mcpHub?: McpHub
10 | toolOptions?: any
11 | partialReadsEnabled?: boolean
12 | settings?: Record
13 | }
14 |
--------------------------------------------------------------------------------
/src/core/task-persistence/index.ts:
--------------------------------------------------------------------------------
1 | export { readApiMessages, saveApiMessages } from "./apiMessages"
2 | export { readTaskMessages, saveTaskMessages } from "./taskMessages"
3 | export { taskMetadata } from "./taskMetadata"
4 |
--------------------------------------------------------------------------------
/src/core/tools/validateToolUse.ts:
--------------------------------------------------------------------------------
1 | import type { ToolName, ModeConfig } from "@roo-code/types"
2 |
3 | import { Mode, isToolAllowedForMode } from "../../shared/modes"
4 |
5 | export function validateToolUse(
6 | toolName: ToolName,
7 | mode: Mode,
8 | customModes?: ModeConfig[],
9 | toolRequirements?: Record,
10 | toolParams?: Record,
11 | ): void {
12 | if (!isToolAllowedForMode(toolName, mode, customModes ?? [], toolRequirements, toolParams)) {
13 | throw new Error(`Tool "${toolName}" is not allowed in ${mode} mode.`)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/core/webview/getNonce.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * A helper function that returns a unique alphanumeric identifier called a nonce.
3 | *
4 | * @remarks This function is primarily used to help enforce content security
5 | * policies for resources/scripts being executed in a webview context.
6 | *
7 | * @returns A nonce
8 | */
9 | export function getNonce() {
10 | let text = ""
11 | const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
12 | for (let i = 0; i < 32; i++) {
13 | text += possible.charAt(Math.floor(Math.random() * possible.length))
14 | }
15 | return text
16 | }
17 |
--------------------------------------------------------------------------------
/src/core/webview/getUri.ts:
--------------------------------------------------------------------------------
1 | import { Uri, Webview } from "vscode"
2 | /**
3 | * A helper function which will get the webview URI of a given file or resource.
4 | *
5 | * @remarks This URI can be used within a webview's HTML as a link to the
6 | * given file/resource.
7 | *
8 | * @param webview A reference to the extension webview
9 | * @param extensionUri The URI of the directory containing the extension
10 | * @param pathList An array of strings representing the path to a file/resource
11 | * @returns A URI pointing to the file/resource
12 | */
13 | export function getUri(webview: Webview, extensionUri: Uri, pathList: string[]) {
14 | return webview.asWebviewUri(Uri.joinPath(extensionUri, ...pathList))
15 | }
16 |
--------------------------------------------------------------------------------
/src/i18n/locales/ca/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Configuració importada correctament."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Avís de Crèdit Baix!",
7 | "message": "Comprova si pots recarregar amb crèdits gratuïts o comprar-ne més!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/ca/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (línies {{start}}-{{end}})",
4 | "definitionsOnly": " (només definicions)",
5 | "maxLines": " (màxim {{max}} línies)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code sembla estar atrapat en un bucle, intentant la mateixa acció ({{toolName}}) repetidament. Això podria indicar un problema amb la seva estratègia actual. Considera reformular la tasca, proporcionar instruccions més específiques o guiar-lo cap a un enfocament diferent.",
8 | "codebaseSearch": {
9 | "approval": "Cercant '{{query}}' a la base de codi..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/de/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Einstellungen erfolgreich importiert."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Warnung: Niedriges Guthaben!",
7 | "message": "Prüfen Sie, ob Sie kostenloses Guthaben aufladen oder mehr kaufen können!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/de/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (Zeilen {{start}}-{{end}})",
4 | "definitionsOnly": " (nur Definitionen)",
5 | "maxLines": " (maximal {{max}} Zeilen)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code scheint in einer Schleife festzustecken und versucht wiederholt dieselbe Aktion ({{toolName}}). Dies könnte auf ein Problem mit der aktuellen Strategie hindeuten. Überlege dir, die Aufgabe umzuformulieren, genauere Anweisungen zu geben oder Kilo Code zu einem anderen Ansatz zu führen.",
8 | "codebaseSearch": {
9 | "approval": "Suche nach '{{query}}' im Codebase..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/en/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Settings imported successfully."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Low Credit Warning!",
7 | "message": "Check to see if you can top up with free credits or purchase some more!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/en/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (lines {{start}}-{{end}})",
4 | "definitionsOnly": " (definitions only)",
5 | "maxLines": " (max {{max}} lines)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code appears to be stuck in a loop, attempting the same action ({{toolName}}) repeatedly. This might indicate a problem with its current strategy. Consider rephrasing the task, providing more specific instructions, or guiding it towards a different approach.",
8 | "codebaseSearch": {
9 | "approval": "Searching for '{{query}}' in codebase..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/es/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Configuración importada correctamente."
4 | },
5 | "lowCreditWarning": {
6 | "title": "¡Advertencia de Crédito Bajo!",
7 | "message": "¡Comprueba si puedes recargar con créditos gratuitos o comprar más!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/es/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (líneas {{start}}-{{end}})",
4 | "definitionsOnly": " (solo definiciones)",
5 | "maxLines": " (máximo {{max}} líneas)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code parece estar atrapado en un bucle, intentando la misma acción ({{toolName}}) repetidamente. Esto podría indicar un problema con su estrategia actual. Considera reformular la tarea, proporcionar instrucciones más específicas o guiarlo hacia un enfoque diferente.",
8 | "codebaseSearch": {
9 | "approval": "Buscando '{{query}}' en la base de código..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/fr/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Paramètres importés avec succès."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Avertissement de Crédit Faible !",
7 | "message": "Vérifiez si vous pouvez recharger avec des crédits gratuits ou en acheter davantage !"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/fr/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (lignes {{start}}-{{end}})",
4 | "definitionsOnly": " (définitions uniquement)",
5 | "maxLines": " (max {{max}} lignes)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code semble être bloqué dans une boucle, tentant la même action ({{toolName}}) de façon répétée. Cela pourrait indiquer un problème avec sa stratégie actuelle. Envisage de reformuler la tâche, de fournir des instructions plus spécifiques ou de le guider vers une approche différente.",
8 | "codebaseSearch": {
9 | "approval": "Recherche de '{{query}}' dans la base de code..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/hi/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "सेटिंग्स सफलतापूर्वक आयात की गईं।"
4 | },
5 | "lowCreditWarning": {
6 | "title": "कम क्रेडिट चेतावनी!",
7 | "message": "जांचें कि क्या आप मुफ्त क्रेडिट से टॉप अप कर सकते हैं या अधिक खरीद सकते हैं!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/hi/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (पंक्तियाँ {{start}}-{{end}})",
4 | "definitionsOnly": " (केवल परिभाषाएँ)",
5 | "maxLines": " (अधिकतम {{max}} पंक्तियाँ)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code एक लूप में फंसा हुआ लगता है, बार-बार एक ही क्रिया ({{toolName}}) को दोहरा रहा है। यह उसकी वर्तमान रणनीति में किसी समस्या का संकेत हो सकता है। कार्य को पुनः परिभाषित करने, अधिक विशिष्ट निर्देश देने, या उसे एक अलग दृष्टिकोण की ओर मार्गदर्शित करने पर विचार करें।",
8 | "codebaseSearch": {
9 | "approval": "कोडबेस में '{{query}}' खोज रहा है..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/id/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Pengaturan berhasil diimpor."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Peringatan Kredit Rendah!",
7 | "message": "Periksa apakah kamu bisa mengisi ulang dengan kredit gratis atau beli lebih banyak!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/id/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (baris {{start}}-{{end}})",
4 | "linesFromToEnd": " (baris {{start}}-akhir)",
5 | "linesFromStartTo": " (baris 1-{{end}})",
6 | "definitionsOnly": " (hanya definisi)",
7 | "maxLines": " (maks {{max}} baris)"
8 | },
9 | "toolRepetitionLimitReached": "Kilo Code tampaknya terjebak dalam loop, mencoba aksi yang sama ({{toolName}}) berulang kali. Ini mungkin menunjukkan masalah dengan strategi saat ini. Pertimbangkan untuk mengubah frasa tugas, memberikan instruksi yang lebih spesifik, atau mengarahkannya ke pendekatan yang berbeda.",
10 | "codebaseSearch": {
11 | "approval": "Mencari '{{query}}' di codebase..."
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/i18n/locales/it/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Impostazioni importate con successo."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Avviso Credito Basso!",
7 | "message": "Verifica se puoi ricaricare con crediti gratuiti o acquistarne altri!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/it/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (righe {{start}}-{{end}})",
4 | "definitionsOnly": " (solo definizioni)",
5 | "maxLines": " (max {{max}} righe)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code sembra essere bloccato in un ciclo, tentando ripetutamente la stessa azione ({{toolName}}). Questo potrebbe indicare un problema con la sua strategia attuale. Considera di riformulare l'attività, fornire istruzioni più specifiche o guidarlo verso un approccio diverso.",
8 | "codebaseSearch": {
9 | "approval": "Ricerca di '{{query}}' nella base di codice..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/ja/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "設定のインポートに成功しました。"
4 | },
5 | "lowCreditWarning": {
6 | "title": "クレジット残高警告!",
7 | "message": "無料クレジットでチャージするか、追加購入できるか確認してください!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/ja/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " ({{start}}-{{end}}行目)",
4 | "definitionsOnly": " (定義のみ)",
5 | "maxLines": " (最大{{max}}行)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Codeが同じ操作({{toolName}})を繰り返し試みるループに陥っているようです。これは現在の方法に問題がある可能性を示しています。タスクの言い換え、より具体的な指示の提供、または別のアプローチへの誘導を検討してください。",
8 | "codebaseSearch": {
9 | "approval": "コードベースで '{{query}}' を検索中..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/ko/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "설정을 성공적으로 가져왔습니다."
4 | },
5 | "lowCreditWarning": {
6 | "title": "크레딧 부족 경고!",
7 | "message": "무료 크레딧으로 충전하거나 추가 구매가 가능한지 확인하세요!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/ko/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " ({{start}}-{{end}}행)",
4 | "definitionsOnly": " (정의만)",
5 | "maxLines": " (최대 {{max}}행)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code가 같은 동작({{toolName}})을 반복적으로 시도하면서 루프에 갇힌 것 같습니다. 이는 현재 전략에 문제가 있을 수 있음을 나타냅니다. 작업을 다시 표현하거나, 더 구체적인 지침을 제공하거나, 다른 접근 방식으로 안내해 보세요.",
8 | "codebaseSearch": {
9 | "approval": "코드베이스에서 '{{query}}' 검색 중..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/nl/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Instellingen succesvol geïmporteerd."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Waarschuwing: laag krediet!",
7 | "message": "Controleer of je kunt opwaarderen met gratis credits of meer kunt kopen!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/nl/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (regels {{start}}-{{end}})",
4 | "definitionsOnly": " (alleen definities)",
5 | "maxLines": " (max {{max}} regels)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code lijkt vast te zitten in een lus, waarbij hij herhaaldelijk dezelfde actie ({{toolName}}) probeert. Dit kan duiden op een probleem met de huidige strategie. Overweeg de taak te herformuleren, specifiekere instructies te geven of Kilo Code naar een andere aanpak te leiden.",
8 | "codebaseSearch": {
9 | "approval": "Zoeken naar '{{query}}' in codebase..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/pl/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Ustawienia zostały pomyślnie zaimportowane."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Ostrzeżenie o Niskim Kredycie!",
7 | "message": "Sprawdź, czy możesz doładować darmowymi kredytami lub kupić więcej!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/pl/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (linie {{start}}-{{end}})",
4 | "definitionsOnly": " (tylko definicje)",
5 | "maxLines": " (maks. {{max}} linii)"
6 | },
7 | "toolRepetitionLimitReached": "Wygląda na to, że Kilo Code utknął w pętli, wielokrotnie próbując wykonać tę samą akcję ({{toolName}}). Może to wskazywać na problem z jego obecną strategią. Rozważ przeformułowanie zadania, podanie bardziej szczegółowych instrukcji lub nakierowanie go na inne podejście.",
8 | "codebaseSearch": {
9 | "approval": "Wyszukiwanie '{{query}}' w bazie kodu..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/pt-BR/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Configurações importadas com sucesso."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Aviso de Crédito Baixo!",
7 | "message": "Verifique se você pode recarregar com créditos gratuitos ou comprar mais!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/pt-BR/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (linhas {{start}}-{{end}})",
4 | "definitionsOnly": " (apenas definições)",
5 | "maxLines": " (máx. {{max}} linhas)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code parece estar preso em um loop, tentando a mesma ação ({{toolName}}) repetidamente. Isso pode indicar um problema com sua estratégia atual. Considere reformular a tarefa, fornecer instruções mais específicas ou guiá-lo para uma abordagem diferente.",
8 | "codebaseSearch": {
9 | "approval": "Pesquisando '{{query}}' na base de código..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/ru/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Настройки успешно импортированы."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Предупреждение о низком балансе!",
7 | "message": "Проверьте, можете ли вы пополнить счет бесплатными кредитами или приобрести дополнительные!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/ru/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (строки {{start}}-{{end}})",
4 | "definitionsOnly": " (только определения)",
5 | "maxLines": " (макс. {{max}} строк)"
6 | },
7 | "toolRepetitionLimitReached": "Похоже, что Kilo Code застрял в цикле, многократно пытаясь выполнить одно и то же действие ({{toolName}}). Это может указывать на проблему с его текущей стратегией. Попробуйте переформулировать задачу, предоставить более конкретные инструкции или направить его к другому подходу.",
8 | "codebaseSearch": {
9 | "approval": "Поиск '{{query}}' в кодовой базе..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/tr/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Ayarlar başarıyla içe aktarıldı."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Düşük Kredi Uyarısı!",
7 | "message": "Ücretsiz kredilerle yükleme yapabilir veya daha fazla satın alabilir misiniz kontrol edin!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/tr/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (satır {{start}}-{{end}})",
4 | "definitionsOnly": " (sadece tanımlar)",
5 | "maxLines": " (maks. {{max}} satır)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code bir döngüye takılmış gibi görünüyor, aynı eylemi ({{toolName}}) tekrar tekrar deniyor. Bu, mevcut stratejisinde bir sorun olduğunu gösterebilir. Görevi yeniden ifade etmeyi, daha spesifik talimatlar vermeyi veya onu farklı bir yaklaşıma yönlendirmeyi düşünün.",
8 | "codebaseSearch": {
9 | "approval": "Kod tabanında '{{query}}' aranıyor..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/vi/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "Cài đặt đã được nhập thành công."
4 | },
5 | "lowCreditWarning": {
6 | "title": "Cảnh Báo Tín Dụng Thấp!",
7 | "message": "Kiểm tra xem bạn có thể nạp thêm tín dụng miễn phí hoặc mua thêm không!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/vi/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (dòng {{start}}-{{end}})",
4 | "definitionsOnly": " (chỉ định nghĩa)",
5 | "maxLines": " (tối đa {{max}} dòng)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code dường như đang bị mắc kẹt trong một vòng lặp, liên tục cố gắng thực hiện cùng một hành động ({{toolName}}). Điều này có thể cho thấy vấn đề với chiến lược hiện tại. Hãy cân nhắc việc diễn đạt lại nhiệm vụ, cung cấp hướng dẫn cụ thể hơn, hoặc hướng Kilo Code theo một cách tiếp cận khác.",
8 | "codebaseSearch": {
9 | "approval": "Đang tìm kiếm '{{query}}' trong cơ sở mã..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/zh-CN/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "设置导入成功。"
4 | },
5 | "lowCreditWarning": {
6 | "title": "余额不足警告!",
7 | "message": "请检查是否可以充值免费额度或购买更多额度!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/zh-CN/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (第 {{start}}-{{end}} 行)",
4 | "definitionsOnly": " (仅定义)",
5 | "maxLines": " (最多 {{max}} 行)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code 似乎陷入循环,反复尝试同一操作 ({{toolName}})。这可能表明当前策略存在问题。请考虑重新描述任务、提供更具体的指示或引导其尝试不同的方法。",
8 | "codebaseSearch": {
9 | "approval": "正在搜索代码库中的 '{{query}}'..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/i18n/locales/zh-TW/kilocode.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "settings_imported": "設定匯入成功。"
4 | },
5 | "lowCreditWarning": {
6 | "title": "餘額不足警告!",
7 | "message": "請檢查是否可以充值免費額度或購買更多額度!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/i18n/locales/zh-TW/tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "readFile": {
3 | "linesRange": " (第 {{start}}-{{end}} 行)",
4 | "definitionsOnly": " (僅定義)",
5 | "maxLines": " (最多 {{max}} 行)"
6 | },
7 | "toolRepetitionLimitReached": "Kilo Code 似乎陷入循環,反覆嘗試同一操作 ({{toolName}})。這可能表明目前策略存在問題。請考慮重新描述工作、提供更具體的指示或引導其嘗試不同的方法。",
8 | "codebaseSearch": {
9 | "approval": "正在搜尋程式碼庫中的「{{query}}」..."
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/base_module.py:
--------------------------------------------------------------------------------
1 | # File: base_module.py
2 |
3 | class BaseClass:
4 | def __init__(self):
5 | print("BaseClass initialized")
6 |
7 | class Collection:
8 | def __init__(self):
9 | print("Collection initialized")
10 |
11 | class Address:
12 | def __init__(self, street: str, city: str, zip_code: str):
13 | self.street = street
14 | self.city = city
15 | self.zip_code = zip_code
16 |
17 | def __str__(self):
18 | return f"{self.street}, {self.city}, {self.zip_code}"
19 |
20 | class Person:
21 | def __init__(self, name: str, address: Address):
22 | self.name = name
23 | self.address = address
24 |
25 | def __str__(self):
26 | return f"{self.name} lives at {self.address}"
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/file1.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "core/autocomplete/context/root-path-context/test/files/models"
5 | )
6 |
7 | func getAddress(user *models.User) *models.Address {
8 | return user.Address
9 | }
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/python/classes.py:
--------------------------------------------------------------------------------
1 | class Group(BaseClass, Person):
2 | pass
3 |
4 | class Group(metaclass=MetaGroup):
5 | pass
6 |
7 | class Group(BaseClass[Address], Gathering[Person]):
8 | pass
9 |
10 | class Group(List[Address], Person[str]):
11 | pass
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/typescript/arrowFunctions.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 |
3 | const _getAddress = (_person: Person): Address => {
4 | // TODO
5 | }
6 |
7 | const _logPerson = (_person: Person) => {
8 | // TODO
9 | }
10 |
11 | const _getHardcodedAddress = (): Address => {
12 | // TODO
13 | }
14 |
15 | const _getAddresses = (_people: Person[]): Address[] => {
16 | // TODO
17 | }
18 |
19 | const _logPersonWithAddres = (_person: Person): Person => {
20 | // TODO
21 | }
22 |
23 | const _logPersonOrAddress = (_person: Person | Address): Person | Address => {
24 | // TODO
25 | }
26 |
27 | const _logPersonAndAddress = (_person: Person, _address: Address) => {
28 | // TODO
29 | }
30 |
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/typescript/classMethods.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 |
3 | class _Group {
4 | _getPersonAddress(_person: Person): Address {
5 | // TODO
6 | }
7 |
8 | _getHardcodedAddress(): Address {
9 | // TODO
10 | }
11 |
12 | _addPerson(_person: Person) {
13 | // TODO
14 | }
15 |
16 | _addPeople(_people: Person[]) {
17 | // TODO
18 | }
19 |
20 | _getAddresses(_people: Person[]): Address[] {
21 | // TODO
22 | }
23 |
24 | _logPersonWithAddress(_person: Person): Person {
25 | // TODO
26 | }
27 |
28 | _logPersonOrAddress(_person: Person | Address): Person | Address {
29 | // TODO
30 | }
31 |
32 | _logPersonAndAddress(_person: Person, _address: Address) {
33 | // TODO
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/typescript/classes.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 |
3 | class _Group extends BaseClass {}
4 |
5 | class _Group2 implements FirstInterface {} // Renamed to avoid duplicate identifier
6 |
7 | class _Group3 extends BaseClass implements FirstInterface, SecondInterface {} // Renamed
8 |
9 | class _Group4 extends BaseClass implements FirstInterface {} // Renamed
10 |
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/typescript/functions.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 |
3 | function _getAddress(_person: Person): Address {
4 | // TODO
5 | }
6 |
7 | function _getFirstAddress(_people: Person[]): Address {
8 | // TODO
9 | }
10 |
11 | function _logPerson(_person: Person) {
12 | // TODO
13 | }
14 |
15 | function _getHardcodedAddress(): Address {
16 | // TODO
17 | }
18 |
19 | function _getAddresses(_people: Person[]): Address[] {
20 | // TODO
21 | }
22 |
23 | function _logPersonWithAddress(_person: Person): Person {
24 | // TODO
25 | }
26 |
27 | function _logPersonOrAddress(_person: Person | Address): Person | Address {
28 | // TODO
29 | }
30 |
31 | function _logPersonAndAddress(_person: Person, _address: Address) {
32 | // TODO
33 | }
34 |
--------------------------------------------------------------------------------
/src/services/autocomplete/__tests__/fixtures/contextGatherer/typescript/generators.ts:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 |
3 | function* _getAddress(_person: Person): Address {
4 | // TODO
5 | }
6 |
7 | function* _getFirstAddress(_people: Person[]): Address {
8 | // TODO
9 | }
10 |
11 | function* _logPerson(_person: Person) {
12 | // TODO
13 | }
14 |
15 | function* _getHardcodedAddress(): Address {
16 | // TODO
17 | }
18 |
19 | function* _getAddresses(_people: Person[]): Address[] {
20 | // TODO
21 | }
22 |
23 | function* _logPersonWithAddress(_person: Person): Person {
24 | // TODO
25 | }
26 |
27 | function* _logPersonOrAddress(_person: Person | Address): Person | Address {
28 | // TODO
29 | }
30 |
31 | function* _logPersonAndAddress(_person: Person, _address: Address) {
32 | // TODO
33 | }
34 |
--------------------------------------------------------------------------------
/src/services/autocomplete/context/ContextRetrievalService.ts:
--------------------------------------------------------------------------------
1 | //PLANREF: continue/core/autocomplete/context/ContextRetrievalService.ts
2 | import { IDE } from "../utils/ide"
3 |
4 | import { ImportDefinitionsService } from "./ImportDefinitionsService"
5 |
6 | export class ContextRetrievalService {
7 | private importDefinitionsService: ImportDefinitionsService
8 |
9 | constructor(private readonly ide: IDE) {
10 | this.importDefinitionsService = new ImportDefinitionsService(this.ide)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/services/checkpoints/RepoPerTaskCheckpointService.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path"
2 |
3 | import { CheckpointServiceOptions } from "./types"
4 | import { ShadowCheckpointService } from "./ShadowCheckpointService"
5 |
6 | export class RepoPerTaskCheckpointService extends ShadowCheckpointService {
7 | public static create({ taskId, workspaceDir, shadowDir, log = console.log }: CheckpointServiceOptions) {
8 | return new RepoPerTaskCheckpointService(
9 | taskId,
10 | path.join(shadowDir, "tasks", taskId, "checkpoints"),
11 | workspaceDir,
12 | log,
13 | )
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/services/checkpoints/constants.ts:
--------------------------------------------------------------------------------
1 | export const GIT_DISABLED_SUFFIX = "_disabled"
2 |
--------------------------------------------------------------------------------
/src/services/checkpoints/index.ts:
--------------------------------------------------------------------------------
1 | export type { CheckpointServiceOptions } from "./types"
2 |
3 | export { RepoPerTaskCheckpointService } from "./RepoPerTaskCheckpointService"
4 |
--------------------------------------------------------------------------------
/src/services/code-index/interfaces/cache.ts:
--------------------------------------------------------------------------------
1 | export interface ICacheManager {
2 | getHash(filePath: string): string | undefined
3 | updateHash(filePath: string, hash: string): void
4 | deleteHash(filePath: string): void
5 | getAllHashes(): Record
6 | }
7 |
--------------------------------------------------------------------------------
/src/services/code-index/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./embedder"
2 | export * from "./vector-store"
3 | export * from "./file-processor"
4 | export * from "./manager"
5 |
--------------------------------------------------------------------------------
/src/services/code-index/processors/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./parser"
2 | export * from "./scanner"
3 | export * from "./file-watcher"
4 |
--------------------------------------------------------------------------------
/src/services/code-index/shared/supported-extensions.ts:
--------------------------------------------------------------------------------
1 | import { extensions as allExtensions } from "../../tree-sitter"
2 |
3 | // Filter out markdown extensions for the scanner
4 | export const scannerExtensions = allExtensions.filter((ext) => ext !== ".md" && ext !== ".markdown")
5 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectJson.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it } from "@jest/globals"
2 | import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
3 | import { javascriptQuery } from "../queries"
4 | import sampleJsonContent from "./fixtures/sample-json"
5 |
6 | describe("inspectJson", () => {
7 | const testOptions = {
8 | language: "javascript",
9 | wasmFile: "tree-sitter-javascript.wasm",
10 | queryString: javascriptQuery,
11 | extKey: "json",
12 | }
13 |
14 | it("should inspect JSON tree structure", async () => {
15 | await inspectTreeStructure(sampleJsonContent, "json")
16 | })
17 |
18 | it("should parse JSON definitions", async () => {
19 | await testParseSourceCodeDefinitions("test.json", sampleJsonContent, testOptions)
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectKotlin.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it } from "@jest/globals"
2 | import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
3 | import { kotlinQuery } from "../queries"
4 | import sampleKotlinContent from "./fixtures/sample-kotlin"
5 |
6 | describe("inspectKotlin", () => {
7 | const testOptions = {
8 | language: "kotlin",
9 | wasmFile: "tree-sitter-kotlin.wasm",
10 | queryString: kotlinQuery,
11 | extKey: "kt",
12 | }
13 |
14 | it("should inspect Kotlin tree structure", async () => {
15 | await inspectTreeStructure(sampleKotlinContent, "kotlin")
16 | })
17 |
18 | it("should parse Kotlin definitions", async () => {
19 | await testParseSourceCodeDefinitions("test.kt", sampleKotlinContent, testOptions)
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectPhp.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it } from "@jest/globals"
2 | import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
3 | import { phpQuery } from "../queries"
4 | import samplePhpContent from "./fixtures/sample-php"
5 |
6 | describe("inspectPhp", () => {
7 | const testOptions = {
8 | language: "php",
9 | wasmFile: "tree-sitter-php.wasm",
10 | queryString: phpQuery,
11 | extKey: "php",
12 | }
13 |
14 | it("should inspect PHP tree structure", async () => {
15 | await inspectTreeStructure(samplePhpContent, "php")
16 | })
17 |
18 | it("should parse PHP definitions", async () => {
19 | await testParseSourceCodeDefinitions("test.php", samplePhpContent, testOptions)
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectTLAPlus.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it } from "@jest/globals"
2 | import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
3 | import { tlaPlusQuery } from "../queries"
4 | import sampleTLAPlusContent from "./fixtures/sample-tlaplus"
5 |
6 | describe("inspectTLAPlus", () => {
7 | const testOptions = {
8 | language: "tlaplus",
9 | wasmFile: "tree-sitter-tlaplus.wasm",
10 | queryString: tlaPlusQuery,
11 | extKey: "tla",
12 | }
13 |
14 | it("should inspect TLA+ tree structure", async () => {
15 | await inspectTreeStructure(sampleTLAPlusContent, "tlaplus")
16 | })
17 |
18 | it("should parse TLA+ definitions", async () => {
19 | await testParseSourceCodeDefinitions("test.tla", sampleTLAPlusContent, testOptions)
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectTOML.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it } from "@jest/globals"
2 | import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
3 | import { tomlQuery } from "../queries"
4 | import { sampleToml } from "./fixtures/sample-toml"
5 |
6 | describe("inspectTOML", () => {
7 | const testOptions = {
8 | language: "toml",
9 | wasmFile: "tree-sitter-toml.wasm",
10 | queryString: tomlQuery,
11 | extKey: "toml",
12 | }
13 |
14 | it("should inspect TOML tree structure", async () => {
15 | await inspectTreeStructure(sampleToml, "toml")
16 | })
17 |
18 | it("should parse TOML definitions", async () => {
19 | await testParseSourceCodeDefinitions("test.toml", sampleToml, testOptions)
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectVue.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it } from "@jest/globals"
2 | import { inspectTreeStructure, testParseSourceCodeDefinitions, debugLog } from "./helpers"
3 | import { vueQuery } from "../queries/vue"
4 | import { sampleVue } from "./fixtures/sample-vue"
5 |
6 | describe("Vue Parser", () => {
7 | const testOptions = {
8 | language: "vue",
9 | wasmFile: "tree-sitter-vue.wasm",
10 | queryString: vueQuery,
11 | extKey: "vue",
12 | }
13 |
14 | it("should inspect Vue tree structure", async () => {
15 | await inspectTreeStructure(sampleVue, "vue")
16 | })
17 |
18 | it("should parse Vue definitions", async () => {
19 | const result = await testParseSourceCodeDefinitions("test.vue", sampleVue, testOptions)
20 | debugLog("Vue parse result:", result)
21 | })
22 | })
23 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/__tests__/inspectZig.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it, expect } from "@jest/globals"
2 | import { testParseSourceCodeDefinitions, inspectTreeStructure } from "./helpers"
3 | import { sampleZig } from "./fixtures/sample-zig"
4 | import { zigQuery } from "../queries"
5 |
6 | describe("Zig Tree-sitter Parser", () => {
7 | it("should inspect tree structure", async () => {
8 | await inspectTreeStructure(sampleZig, "zig")
9 | })
10 |
11 | it("should parse source code definitions", async () => {
12 | const result = await testParseSourceCodeDefinitions("file.zig", sampleZig, {
13 | language: "zig",
14 | wasmFile: "tree-sitter-zig.wasm",
15 | queryString: zigQuery,
16 | extKey: "zig",
17 | })
18 | expect(result).toBeDefined()
19 | })
20 | })
21 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/queries/embedded_template.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Supported Embedded Template structures:
3 | - Code blocks (class, module, method definitions)
4 | - Output blocks (expressions)
5 | - Comments
6 | */
7 | export default `
8 | ; Code blocks - class, module, method definitions
9 | (directive
10 | (code) @name.definition.code) @definition.directive
11 |
12 | ; Output blocks - expressions
13 | (output_directive
14 | (code) @output.content) @output
15 |
16 | ; Comments - documentation and section markers
17 | (comment_directive
18 | (comment) @name.definition.comment) @definition.comment
19 | `
20 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/queries/toml.ts:
--------------------------------------------------------------------------------
1 | // Query patterns for TOML syntax elements
2 | export const tomlQuery = `
3 | ; Tables - capture the entire table node
4 | (table) @definition
5 |
6 | ; Array tables - capture the entire array table node
7 | (table_array_element) @definition
8 |
9 | ; Key-value pairs - capture the entire pair
10 | (pair) @definition
11 |
12 | ; Arrays and inline tables
13 | (array) @definition
14 | (inline_table) @definition
15 |
16 | ; Basic values
17 | (string) @definition
18 | (integer) @definition
19 | (float) @definition
20 | (boolean) @definition
21 | (offset_date_time) @definition
22 | (local_date) @definition
23 | (local_time) @definition
24 | `
25 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/queries/vue.ts:
--------------------------------------------------------------------------------
1 | export const vueQuery = `
2 | ; Top-level structure
3 | (component) @component.definition
4 |
5 | ; Template section
6 | (template_element) @template.definition
7 | (template_element
8 | (element
9 | (start_tag
10 | (tag_name) @element.name.definition))
11 | (element
12 | (start_tag
13 | (attribute
14 | (attribute_name) @attribute.name.definition)))
15 | (element
16 | (start_tag
17 | (directive_attribute
18 | (directive_name) @directive.name.definition))))
19 |
20 | ; Script section
21 | (script_element) @script.definition
22 | (script_element
23 | (raw_text) @script.content.definition)
24 |
25 | ; Style section
26 | (style_element) @style.definition
27 | (style_element
28 | (raw_text) @style.content.definition)
29 | `
30 |
--------------------------------------------------------------------------------
/src/services/tree-sitter/queries/zig.ts:
--------------------------------------------------------------------------------
1 | export const zigQuery = `
2 | ; Functions
3 | (function_declaration) @function.definition
4 |
5 | ; Structs and containers
6 | (variable_declaration
7 | (identifier) @name
8 | (struct_declaration)
9 | ) @container.definition
10 |
11 | ; Enums
12 | (variable_declaration
13 | (identifier) @name
14 | (enum_declaration)
15 | ) @container.definition
16 |
17 | ; Variables and constants
18 | (variable_declaration
19 | (identifier) @name
20 | ) @variable.definition
21 | `
22 |
--------------------------------------------------------------------------------
/src/shared/TelemetrySetting.ts:
--------------------------------------------------------------------------------
1 | export type TelemetrySetting = "unset" | "enabled" | "disabled"
2 |
--------------------------------------------------------------------------------
/src/shared/__tests__/language.test.ts:
--------------------------------------------------------------------------------
1 | // npx jest src/shared/__tests__/language.test.ts
2 |
3 | import { formatLanguage } from "../language"
4 |
5 | describe("formatLanguage", () => {
6 | it("should uppercase region code in locale string", () => {
7 | expect(formatLanguage("pt-br")).toBe("pt-BR")
8 | expect(formatLanguage("zh-cn")).toBe("zh-CN")
9 | })
10 |
11 | it("should return original string if no region code present", () => {
12 | expect(formatLanguage("en")).toBe("en")
13 | expect(formatLanguage("fr")).toBe("fr")
14 | })
15 |
16 | it("should handle empty or undefined input", () => {
17 | expect(formatLanguage("")).toBe("en")
18 | expect(formatLanguage(undefined as unknown as string)).toBe("en")
19 | })
20 | })
21 |
--------------------------------------------------------------------------------
/src/shared/cline-rules.ts:
--------------------------------------------------------------------------------
1 | // kilocode_change whole file
2 | export type ClineRulesToggles = Record // filepath -> enabled/disabled
3 |
--------------------------------------------------------------------------------
/src/shared/globalFileNames.ts:
--------------------------------------------------------------------------------
1 | export const GlobalFileNames = {
2 | apiConversationHistory: "api_conversation_history.json",
3 | uiMessages: "ui_messages.json",
4 | mcpSettings: "mcp_settings.json",
5 | customModes: "custom_modes.yaml",
6 | taskMetadata: "task_metadata.json",
7 | kiloRules: ".kilocode/rules", // kilocode_change
8 | workflows: ".kilocode/workflows", // kilocode_change
9 | }
10 |
--------------------------------------------------------------------------------
/src/shared/kilocode/api.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/shared/kilocode/api.ts
--------------------------------------------------------------------------------
/src/shared/safeJsonParse.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Safely parses JSON without crashing on invalid input
3 | *
4 | * @param jsonString The string to parse
5 | * @param defaultValue Value to return if parsing fails
6 | * @returns Parsed JSON object or defaultValue if parsing fails
7 | */
8 | export function safeJsonParse(jsonString: string | null | undefined, defaultValue?: T): T | undefined {
9 | if (!jsonString) {
10 | return defaultValue
11 | }
12 |
13 | try {
14 | return JSON.parse(jsonString) as T
15 | } catch (error) {
16 | // Log the error to the console for debugging
17 | console.error("Error parsing JSON:", error)
18 | return defaultValue
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/shared/vsCodeSelectorUtils.ts:
--------------------------------------------------------------------------------
1 | import { LanguageModelChatSelector } from "vscode"
2 |
3 | export const SELECTOR_SEPARATOR = "/"
4 |
5 | export function stringifyVsCodeLmModelSelector(selector: LanguageModelChatSelector): string {
6 | return [selector.vendor, selector.family, selector.version, selector.id].filter(Boolean).join(SELECTOR_SEPARATOR)
7 | }
8 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "experimentalDecorators": true,
5 | "forceConsistentCasingInFileNames": true,
6 | "isolatedModules": true,
7 | "lib": ["es2022", "esnext.disposable", "DOM"],
8 | "module": "esnext",
9 | "moduleResolution": "Bundler",
10 | "noFallthroughCasesInSwitch": true,
11 | "noImplicitOverride": true,
12 | "noImplicitReturns": true,
13 | "noUnusedLocals": false,
14 | "resolveJsonModule": true,
15 | "rootDir": ".",
16 | "skipLibCheck": true,
17 | "sourceMap": true,
18 | "strict": true,
19 | "target": "es2022",
20 | "useDefineForClassFields": true,
21 | "useUnknownInCatchVariables": false
22 | },
23 | "include": ["."],
24 | "exclude": ["node_modules"]
25 | }
26 |
--------------------------------------------------------------------------------
/src/utils/commands.ts:
--------------------------------------------------------------------------------
1 | import type { CommandId, CodeActionId, TerminalActionId } from "@roo-code/types"
2 |
3 | import { Package } from "../shared/package"
4 |
5 | export const getCommand = (id: CommandId) => `${Package.name}.${id}`
6 |
7 | export const getCodeActionCommand = (id: CodeActionId) => `${Package.name}.${id}`
8 |
9 | export const getTerminalCommand = (id: TerminalActionId) => `${Package.name}.${id}`
10 |
--------------------------------------------------------------------------------
/src/utils/kilocode-token.ts:
--------------------------------------------------------------------------------
1 | export function getKiloBaseUriFromToken(kilocodeToken: string) {
2 | try {
3 | const payload_string = kilocodeToken.split(".")[1]
4 | const payload = JSON.parse(Buffer.from(payload_string, "base64").toString())
5 | //note: this is UNTRUSTED, so we need to make sure we're OK with this being manipulated by an attacker; e.g. we should not read uri's from the JWT directly.
6 | if (payload.env === "development") return "http://localhost:3000"
7 | } catch (_error) {
8 | console.warn("Failed to get base URL from Kilo Code token")
9 | }
10 | return "https://kilocode.ai"
11 | }
12 |
--------------------------------------------------------------------------------
/src/utils/logging/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview Main entry point for the compact logging system
3 | * Provides a default logger instance with Jest environment detection
4 | */
5 |
6 | import { CompactLogger } from "./CompactLogger"
7 |
8 | /**
9 | * No-operation logger implementation for production environments
10 | */
11 | const noopLogger = {
12 | debug: () => {},
13 | info: () => {},
14 | warn: () => {},
15 | error: () => {},
16 | fatal: () => {},
17 | child: () => noopLogger,
18 | close: () => {},
19 | }
20 |
21 | /**
22 | * Default logger instance
23 | * Uses CompactLogger for normal operation, switches to noop logger in Jest test environment
24 | */
25 | export const logger = process.env.JEST_WORKER_ID !== undefined ? new CompactLogger() : noopLogger
26 |
--------------------------------------------------------------------------------
/src/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config"
2 | import path from "path"
3 |
4 | export default defineConfig({
5 | test: {
6 | include: ["**/__tests__/**/*.spec.ts"],
7 | globals: true,
8 | },
9 | })
10 |
--------------------------------------------------------------------------------
/src/walkthrough/images/askui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/askui.png
--------------------------------------------------------------------------------
/src/walkthrough/images/context.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/context.gif
--------------------------------------------------------------------------------
/src/walkthrough/images/custom_modes.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/custom_modes.gif
--------------------------------------------------------------------------------
/src/walkthrough/images/design_patterns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/design_patterns.png
--------------------------------------------------------------------------------
/src/walkthrough/images/hn-clone-django.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/hn-clone-django.gif
--------------------------------------------------------------------------------
/src/walkthrough/images/hn-nextjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/hn-nextjs.png
--------------------------------------------------------------------------------
/src/walkthrough/images/modes.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/modes.gif
--------------------------------------------------------------------------------
/src/walkthrough/images/unknown_error_stripe_rb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/src/walkthrough/images/unknown_error_stripe_rb.png
--------------------------------------------------------------------------------
/src/walkthrough/step1.md:
--------------------------------------------------------------------------------
1 | # Code mode
2 |
3 | Describe what you want to build in the text area and press ⮐ Enter.
4 |
5 |
6 |
7 | The more context you give, the better the result. Include things like your tech stack, key features, or file names.
8 |
9 | _Example: Create a Hacker News clone in Next.js_
10 |
11 | Kilo Code will write the code, generate the files, and run the project for you.
12 |
13 | ## Kilo Code has many Modes ...
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/walkthrough/step2.md:
--------------------------------------------------------------------------------
1 | # Ask mode
2 |
3 |
4 |
5 | Have a question about your code? Switch to Ask mode and type it out. Kilo Code will scan your codebase and give you a clear, accurate explanation.
6 |
7 | Tip: Reference specific files or functions for more precise answers.
8 |
--------------------------------------------------------------------------------
/src/walkthrough/step3.md:
--------------------------------------------------------------------------------
1 | # Debug mode
2 |
3 |
4 |
5 | Running into errors? Switch to Debug mode and describe the problem. Kilo Code will analyze the code, find the issue, and apply a fix.
6 |
7 | You can paste error messages or point to a file. Kilo Code will take it from there.
8 |
--------------------------------------------------------------------------------
/src/walkthrough/step4.md:
--------------------------------------------------------------------------------
1 | # Architect mode
2 |
3 |
4 |
5 | Need to plan before writing code? Switch to Architect mode and ask high-level questions about structure, patterns, or logic.
6 |
7 | Use it to break down features, map out components, or design how everything should work before diving in.
8 |
--------------------------------------------------------------------------------
/src/walkthrough/step5.md:
--------------------------------------------------------------------------------
1 | # Improve your prompt
2 |
3 | Click the stars icon to make your prompt clearer and more complete. Kilo Code will rewrite it to get better results.
4 |
5 | # Add files or folders for context
6 |
7 | Mention files or folders in your prompt. Kilo Code will use them to better understand and respond to your request.
8 |
9 | Click the paperclip in the text area or use @ to add context.
10 |
11 | # Add custom modes
12 |
13 | Go beyond the default modes by creating your own. Tailor them to your workflow with specific instructions or focus areas.
14 |
15 | Click mode switcher in the text area or use / to switch modes.
16 |
--------------------------------------------------------------------------------
/src/workers/countTokens.ts:
--------------------------------------------------------------------------------
1 | import workerpool from "workerpool"
2 |
3 | import { Anthropic } from "@anthropic-ai/sdk"
4 |
5 | import { tiktoken } from "../utils/tiktoken"
6 |
7 | import { type CountTokensResult } from "./types"
8 |
9 | async function countTokens(content: Anthropic.Messages.ContentBlockParam[]): Promise {
10 | try {
11 | const count = await tiktoken(content)
12 | return { success: true, count }
13 | } catch (error) {
14 | return {
15 | success: false,
16 | error: error instanceof Error ? error.message : "Unknown error",
17 | }
18 | }
19 | }
20 |
21 | workerpool.worker({ countTokens })
22 |
--------------------------------------------------------------------------------
/src/workers/types.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod"
2 |
3 | export const countTokensResultSchema = z.discriminatedUnion("success", [
4 | z.object({
5 | success: z.literal(true),
6 | count: z.number(),
7 | }),
8 | z.object({ success: z.literal(false), error: z.string() }),
9 | ])
10 |
11 | export type CountTokensResult = z.infer
12 |
--------------------------------------------------------------------------------
/webview-ui/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | *storybook.log
26 |
27 | tsconfig.tsbuildinfo
28 |
--------------------------------------------------------------------------------
/webview-ui/.storybook/main.ts:
--------------------------------------------------------------------------------
1 | import type { StorybookConfig } from "@storybook/react-vite"
2 |
3 | const config: StorybookConfig = {
4 | stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5 | addons: ["@storybook/addon-essentials", "storybook-dark-mode"],
6 | framework: {
7 | name: "@storybook/react-vite",
8 | options: {},
9 | },
10 | }
11 | export default config
12 |
--------------------------------------------------------------------------------
/webview-ui/.storybook/preview.ts:
--------------------------------------------------------------------------------
1 | import type { Preview } from "@storybook/react"
2 |
3 | import "./vscode.css"
4 | import "../src/index.css"
5 |
6 | const preview: Preview = {
7 | parameters: {
8 | controls: {
9 | matchers: {
10 | color: /(background|color)$/i,
11 | date: /Date$/i,
12 | },
13 | },
14 | },
15 | }
16 |
17 | export default preview
18 |
--------------------------------------------------------------------------------
/webview-ui/audio/celebration.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/audio/celebration.wav
--------------------------------------------------------------------------------
/webview-ui/audio/notification.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/audio/notification.wav
--------------------------------------------------------------------------------
/webview-ui/audio/progress_loop.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/audio/progress_loop.wav
--------------------------------------------------------------------------------
/webview-ui/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "new-york",
4 | "rsc": false,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.js",
8 | "css": "src/index.css",
9 | "baseColor": "neutral",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/webview-ui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Kilo Code
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/webview-ui/public/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/public/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/__mocks__/components/chat/TaskHeader.tsx:
--------------------------------------------------------------------------------
1 | const TaskHeader = () => Mocked TaskHeader
2 |
3 | export default TaskHeader
4 |
--------------------------------------------------------------------------------
/webview-ui/src/__mocks__/lucide-react.ts:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export const Check = () => React.createElement("div")
4 | export const ChevronsUpDown = () => React.createElement("div")
5 | export const Loader = () => React.createElement("div")
6 | export const X = () => React.createElement("div")
7 | export const Edit = () => React.createElement("div")
8 | export const Database = (props: any) => React.createElement("span", { "data-testid": "database-icon", ...props })
9 | export const Paperclip = (props: any) => React.createElement("span", { "data-testid": "paperclip-icon", ...props })
10 |
--------------------------------------------------------------------------------
/webview-ui/src/__mocks__/posthog-js.ts:
--------------------------------------------------------------------------------
1 | // Mock implementation of posthog-js
2 | const posthogMock = {
3 | init: jest.fn(),
4 | capture: jest.fn(),
5 | opt_in_capturing: jest.fn(),
6 | opt_out_capturing: jest.fn(),
7 | reset: jest.fn(),
8 | identify: jest.fn(),
9 | }
10 |
11 | export default posthogMock
12 |
--------------------------------------------------------------------------------
/webview-ui/src/__mocks__/pretty-bytes.js:
--------------------------------------------------------------------------------
1 | module.exports = function prettyBytes(bytes) {
2 | if (typeof bytes !== "number") {
3 | throw new TypeError("Expected a number")
4 | }
5 |
6 | // Simple mock implementation that returns formatted strings.
7 | if (bytes === 0) return "0 B"
8 | if (bytes < 1024) return `${bytes} B`
9 | if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`
10 | if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`
11 | return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`
12 | }
13 |
--------------------------------------------------------------------------------
/webview-ui/src/__mocks__/utils/highlighter.ts:
--------------------------------------------------------------------------------
1 | export type ExtendedLanguage = string
2 |
3 | export const highlighter = {
4 | codeToHtml: jest.fn((code: string) => `${code}
`),
5 | getLoadedThemes: jest.fn(() => []),
6 | loadTheme: jest.fn(),
7 | }
8 |
9 | export const getHighlighter = jest.fn(() => Promise.resolve(highlighter))
10 |
11 | export const isLanguageLoaded = jest.fn(() => true)
12 |
13 | export const normalizeLanguage = jest.fn((lang: string): ExtendedLanguage => lang)
14 |
15 | // Mock bundledLanguages
16 | export const bundledLanguages = {
17 | javascript: jest.fn(),
18 | typescript: jest.fn(),
19 | python: jest.fn(),
20 | html: jest.fn(),
21 | css: jest.fn(),
22 | json: jest.fn(),
23 | // Add more as needed
24 | }
25 |
--------------------------------------------------------------------------------
/webview-ui/src/__mocks__/vscrui.ts:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export const Checkbox = ({ children, onChange }: any) =>
4 | React.createElement("div", { "data-testid": "mock-checkbox", onClick: onChange }, children)
5 |
6 | export const Dropdown = ({ children, onChange }: any) =>
7 | React.createElement("div", { "data-testid": "mock-dropdown", onClick: onChange }, children)
8 |
9 | export const Pane = ({ children }: any) => React.createElement("div", { "data-testid": "mock-pane" }, children)
10 |
11 | export const Button = ({ children, ...props }: any) =>
12 | React.createElement("div", { "data-testid": "mock-button", ...props }, children)
13 |
14 | export type DropdownOption = {
15 | label: string
16 | value: string
17 | }
18 |
--------------------------------------------------------------------------------
/webview-ui/src/components/chat/ProfileViolationWarning.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { useAppTranslation } from "@/i18n/TranslationContext"
3 |
4 | export const ProfileViolationWarning: React.FC = () => {
5 | const { t } = useAppTranslation()
6 |
7 | return (
8 |
9 |
10 |
11 |
12 |
{t("chat:profileViolationWarning")}
13 |
14 | )
15 | }
16 |
17 | export default ProfileViolationWarning
18 |
--------------------------------------------------------------------------------
/webview-ui/src/components/chat/ProgressIndicator.tsx:
--------------------------------------------------------------------------------
1 | import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"
2 |
3 | export const ProgressIndicator = () => (
4 |
16 | )
17 |
--------------------------------------------------------------------------------
/webview-ui/src/components/chat/SystemPromptWarning.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { useAppTranslation } from "@/i18n/TranslationContext"
3 |
4 | export const SystemPromptWarning: React.FC = () => {
5 | const { t } = useAppTranslation()
6 |
7 | return (
8 |
9 |
10 |
11 |
12 |
{t("chat:systemPromptWarning")}
13 |
14 | )
15 | }
16 |
17 | export default SystemPromptWarning
18 |
--------------------------------------------------------------------------------
/webview-ui/src/components/chat/checkpoints/schema.ts:
--------------------------------------------------------------------------------
1 | import { z } from "zod"
2 |
3 | export const checkpointSchema = z.object({
4 | isFirst: z.boolean(),
5 | from: z.string(),
6 | to: z.string(),
7 | })
8 |
9 | export type Checkpoint = z.infer
10 |
--------------------------------------------------------------------------------
/webview-ui/src/components/common/DangerButton.tsx:
--------------------------------------------------------------------------------
1 | import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
2 |
3 | type DangerButtonProps = React.ComponentProps
4 |
5 | const DangerButton: React.FC = (props) => {
6 | return (
7 |
20 | )
21 | }
22 |
23 | export default DangerButton
24 |
--------------------------------------------------------------------------------
/webview-ui/src/components/common/ToolUseBlock.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from "@/lib/utils"
2 |
3 | import { CODE_BLOCK_BG_COLOR } from "./CodeBlock"
4 |
5 | export const ToolUseBlock = ({ className, ...props }: React.HTMLAttributes) => (
6 |
13 | )
14 |
15 | export const ToolUseBlockHeader = ({ className, ...props }: React.HTMLAttributes) => (
16 |
17 | )
18 |
--------------------------------------------------------------------------------
/webview-ui/src/components/common/VSCodeButtonLink.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
3 |
4 | interface VSCodeButtonLinkProps {
5 | href: string
6 | children: React.ReactNode
7 | [key: string]: any
8 | }
9 |
10 | export const VSCodeButtonLink = ({ href, children, ...props }: VSCodeButtonLinkProps) => (
11 |
17 | {children}
18 |
19 | )
20 |
--------------------------------------------------------------------------------
/webview-ui/src/components/common/__mocks__/CodeBlock.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | interface CodeBlockProps {
4 | children?: React.ReactNode
5 | language: string
6 | }
7 |
8 | const CodeBlock: React.FC = () => Mocked Code Block
9 |
10 | export default CodeBlock
11 |
--------------------------------------------------------------------------------
/webview-ui/src/components/common/__mocks__/MarkdownBlock.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | interface MarkdownBlockProps {
4 | children?: React.ReactNode
5 | content?: string
6 | }
7 |
8 | const MarkdownBlock: React.FC = ({ content }) => (
9 | {content}
10 | )
11 |
12 | export default MarkdownBlock
13 |
--------------------------------------------------------------------------------
/webview-ui/src/components/history/ExportButton.tsx:
--------------------------------------------------------------------------------
1 | import { vscode } from "@/utils/vscode"
2 | import { Button } from "@/components/ui"
3 | import { useAppTranslation } from "@/i18n/TranslationContext"
4 |
5 | export const ExportButton = ({ itemId }: { itemId: string }) => {
6 | const { t } = useAppTranslation()
7 |
8 | return (
9 |
20 | )
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/components/history/HistoryPreview.tsx:
--------------------------------------------------------------------------------
1 | import { memo } from "react"
2 |
3 | import { useTaskSearch } from "./useTaskSearch"
4 | import TaskItem from "./TaskItem"
5 |
6 | const HistoryPreview = () => {
7 | const { tasks } = useTaskSearch()
8 |
9 | return (
10 |
11 | {tasks.length !== 0 && (
12 | <>
13 | {tasks.slice(0, 3).map((item) => (
14 |
15 | ))}
16 | >
17 | )}
18 |
19 | )
20 | }
21 |
22 | export default memo(HistoryPreview)
23 |
--------------------------------------------------------------------------------
/webview-ui/src/components/kilocode/chat/NewTaskPreview.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import MarkdownBlock from "../../common/MarkdownBlock"
3 | import { useTranslation } from "react-i18next"
4 |
5 | interface NewTaskPreviewProps {
6 | context: string
7 | }
8 |
9 | export const NewTaskPreview: React.FC = ({ context }) => {
10 | const { t } = useTranslation()
11 |
12 | return (
13 |
14 | {t("kilocode:newTaskPreview.task")}
15 |
16 |
17 | )
18 | }
19 |
20 | export default NewTaskPreview
21 |
--------------------------------------------------------------------------------
/webview-ui/src/components/kilocode/common/RetryIconButton.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components"
2 |
3 | type RetryIconButtonProps = {
4 | onClick: () => void
5 | }
6 |
7 | const StyledButton = styled.button`
8 | border: 1px solid red;
9 | cursor: pointer;
10 | padding: 0;
11 | border: 0;
12 | padding: 4px 4px 0;
13 | border-radius: 4px;
14 |
15 | &:hover {
16 | background: var(--vscode-button-secondaryBackground);
17 | }
18 | `
19 |
20 | export const RetryIconButton = ({ onClick }: RetryIconButtonProps) => (
21 |
22 |
23 |
24 | )
25 |
--------------------------------------------------------------------------------
/webview-ui/src/components/kilocode/helpers.ts:
--------------------------------------------------------------------------------
1 | export function getKiloCodeBackendAuthUrl(uriScheme: string = "vscode", uiKind: string = "Desktop") {
2 | const baseUrl = "https://kilocode.ai"
3 | const source = uiKind === "Web" ? "web" : uriScheme
4 | return `${baseUrl}/auth/signin?source=${source}`
5 | }
6 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/ApiErrorMessage.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | interface ApiErrorMessageProps {
4 | errorMessage: string | undefined
5 | children?: React.ReactNode
6 | }
7 |
8 | export const ApiErrorMessage = ({ errorMessage, children }: ApiErrorMessageProps) => (
9 |
10 |
11 |
12 |
{errorMessage}
13 |
14 | {children}
15 |
16 | )
17 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/Section.tsx:
--------------------------------------------------------------------------------
1 | import { HTMLAttributes } from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | type SectionProps = HTMLAttributes
6 |
7 | export const Section = ({ className, ...props }: SectionProps) => (
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/SectionHeader.tsx:
--------------------------------------------------------------------------------
1 | import { HTMLAttributes } from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | type SectionHeaderProps = HTMLAttributes & {
6 | children: React.ReactNode
7 | description?: string
8 | }
9 |
10 | export const SectionHeader = ({ description, children, className, ...props }: SectionHeaderProps) => {
11 | return (
12 |
18 |
{children}
19 | {description &&
{description}
}
20 |
21 | )
22 | }
23 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/providers/OpenRouterBalanceDisplay.tsx:
--------------------------------------------------------------------------------
1 | import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
2 |
3 | import { useOpenRouterKeyInfo } from "@/components/ui/hooks/useOpenRouterKeyInfo"
4 |
5 | export const OpenRouterBalanceDisplay = ({ apiKey, baseUrl }: { apiKey: string; baseUrl?: string }) => {
6 | const { data: keyInfo } = useOpenRouterKeyInfo(apiKey, baseUrl)
7 |
8 | if (!keyInfo || !keyInfo.limit) {
9 | return null
10 | }
11 |
12 | const formattedBalance = (keyInfo.limit - keyInfo.usage).toFixed(2)
13 |
14 | return (
15 |
16 | ${formattedBalance}
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/providers/RequestyBalanceDisplay.tsx:
--------------------------------------------------------------------------------
1 | import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
2 |
3 | import { useRequestyKeyInfo } from "@/components/ui/hooks/useRequestyKeyInfo"
4 |
5 | export const RequestyBalanceDisplay = ({ apiKey }: { apiKey: string }) => {
6 | const { data: keyInfo } = useRequestyKeyInfo(apiKey)
7 |
8 | if (!keyInfo) {
9 | return null
10 | }
11 |
12 | // Parse the balance to a number and format it to 2 decimal places.
13 | const balance = parseFloat(keyInfo.org_balance)
14 | const formattedBalance = balance.toFixed(2)
15 |
16 | return (
17 |
18 | ${formattedBalance}
19 |
20 | )
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/providers/index.ts:
--------------------------------------------------------------------------------
1 | export { Anthropic } from "./Anthropic"
2 | export { Bedrock } from "./Bedrock"
3 | export { Chutes } from "./Chutes"
4 | export { DeepSeek } from "./DeepSeek"
5 | export { Gemini } from "./Gemini"
6 | export { Glama } from "./Glama"
7 | export { Groq } from "./Groq"
8 | export { LMStudio } from "./LMStudio"
9 | export { Mistral } from "./Mistral"
10 | export { Ollama } from "./Ollama"
11 | export { OpenAI } from "./OpenAI"
12 | export { OpenAICompatible } from "./OpenAICompatible"
13 | export { OpenRouter } from "./OpenRouter"
14 | export { Requesty } from "./Requesty"
15 | export { Unbound } from "./Unbound"
16 | export { Vertex } from "./Vertex"
17 | export { VSCodeLM } from "./VSCodeLM"
18 | export { XAI } from "./XAI"
19 | export { LiteLLM } from "./LiteLLM"
20 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/transforms.ts:
--------------------------------------------------------------------------------
1 | export const noTransform = (value: T) => value
2 |
3 | export const inputEventTransform = (event: E) => (event as { target: HTMLInputElement })?.target?.value as any
4 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/types.ts:
--------------------------------------------------------------------------------
1 | import type { ExperimentId } from "@roo-code/types"
2 |
3 | import { ExtensionStateContextType } from "@/context/ExtensionStateContext"
4 |
5 | export type SetCachedStateField = (
6 | field: K,
7 | value: ExtensionStateContextType[K],
8 | ) => void
9 |
10 | export type SetExperimentEnabled = (id: ExperimentId, enabled: boolean) => void
11 |
--------------------------------------------------------------------------------
/webview-ui/src/components/settings/utils/headers.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Converts an array of header key-value pairs to a Record object.
3 | *
4 | * @param headers Array of [key, value] tuples representing HTTP headers
5 | * @returns Record with trimmed keys and values
6 | */
7 | export const convertHeadersToObject = (headers: [string, string][]): Record => {
8 | const result: Record = {}
9 |
10 | // Process each header tuple.
11 | for (const [key, value] of headers) {
12 | const trimmedKey = key.trim()
13 |
14 | // Skip empty keys.
15 | if (!trimmedKey) {
16 | continue
17 | }
18 |
19 | // For duplicates, the last one in the array wins.
20 | // This matches how HTTP headers work in general.
21 | result[trimmedKey] = value.trim()
22 | }
23 |
24 | return result
25 | }
26 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/ChatInputProvider.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from "react"
2 |
3 | interface ChatInputContext {
4 | isDisabled: boolean
5 | handleKeyDown: (e: React.KeyboardEvent) => void
6 | handleSubmit: (e: React.FormEvent) => void
7 | }
8 |
9 | export const chatInputContext = createContext(null)
10 |
11 | export const ChatInputProvider = chatInputContext.Provider
12 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/ChatMessageProvider.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from "react"
2 |
3 | import { Message } from "./types"
4 |
5 | export interface ChatMessageContext {
6 | message: Message
7 | isLast: boolean
8 | }
9 |
10 | export const chatMessageContext = createContext(null)
11 |
12 | export const ChatMessageProvider = chatMessageContext.Provider
13 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/ChatProvider.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from "react"
2 |
3 | import { ChatHandler } from "./types"
4 |
5 | type ChatContext = ChatHandler & {
6 | assistantName: string
7 | }
8 |
9 | export const chatContext = createContext(null)
10 |
11 | export const ChatProvider = chatContext.Provider
12 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./types"
2 | export * from "./Chat"
3 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/useChatInput.ts:
--------------------------------------------------------------------------------
1 | import { useContext } from "react"
2 |
3 | import { chatInputContext } from "./ChatInputProvider"
4 |
5 | export const useChatInput = () => {
6 | const context = useContext(chatInputContext)
7 |
8 | if (!context) {
9 | throw new Error("useChatInput must be used within a ChatInputProvider")
10 | }
11 |
12 | return context
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/useChatMessage.ts:
--------------------------------------------------------------------------------
1 | import { useContext } from "react"
2 |
3 | import { chatMessageContext } from "./ChatMessageProvider"
4 |
5 | export const useChatMessage = () => {
6 | const context = useContext(chatMessageContext)
7 |
8 | if (!context) {
9 | throw new Error("useChatMessage must be used within a ChatMessageProvider")
10 | }
11 |
12 | return context
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/chat/useChatUI.ts:
--------------------------------------------------------------------------------
1 | import { useContext } from "react"
2 |
3 | import { chatContext } from "./ChatProvider"
4 |
5 | export const useChatUI = () => {
6 | const context = useContext(chatContext)
7 |
8 | if (!context) {
9 | throw new Error("useChatUI must be used within a ChatProvider")
10 | }
11 |
12 | return context
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/collapsible.tsx:
--------------------------------------------------------------------------------
1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
2 |
3 | const Collapsible = CollapsiblePrimitive.Root
4 |
5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
6 |
7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
8 |
9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }
10 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./useClipboard"
2 | export * from "./useRooPortal"
3 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/hooks/useClipboard.ts:
--------------------------------------------------------------------------------
1 | import { useState } from "react"
2 |
3 | export interface UseClipboardProps {
4 | timeout?: number
5 | }
6 |
7 | export function useClipboard({ timeout = 2000 }: UseClipboardProps = {}) {
8 | const [isCopied, setIsCopied] = useState(false)
9 |
10 | const copy = (value: string) => {
11 | if (typeof window === "undefined" || !navigator.clipboard?.writeText || !value) {
12 | return
13 | }
14 |
15 | navigator.clipboard.writeText(value).then(() => {
16 | setIsCopied(true)
17 | setTimeout(() => setIsCopied(false), timeout)
18 | })
19 | }
20 |
21 | return { isCopied, copy }
22 | }
23 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/hooks/useRooPortal.ts:
--------------------------------------------------------------------------------
1 | import { useState } from "react"
2 | import { useMount } from "react-use"
3 |
4 | export const useRooPortal = (id: string) => {
5 | const [container, setContainer] = useState()
6 |
7 | useMount(() => setContainer(document.getElementById(id) ?? undefined))
8 |
9 | return container
10 | }
11 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./alert-dialog"
2 | export * from "./autosize-textarea"
3 | export * from "./badge"
4 | export * from "./button"
5 | export * from "./checkbox"
6 | export * from "./collapsible"
7 | export * from "./command"
8 | export * from "./dialog"
9 | export * from "./dropdown-menu"
10 | export * from "./input"
11 | export * from "./popover"
12 | export * from "./progress"
13 | export * from "./separator"
14 | export * from "./slider"
15 | export * from "./select-dropdown"
16 | export * from "./select"
17 | export * from "./textarea"
18 | export * from "./tooltip"
19 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/markdown/Blockquote.tsx:
--------------------------------------------------------------------------------
1 | export const Blockquote = ({ children }: { children: React.ReactNode }) => {
2 | return {children}
3 | }
4 |
--------------------------------------------------------------------------------
/webview-ui/src/components/ui/markdown/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./Markdown"
2 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ca/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/ca/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ca/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Compte",
3 | "profilePicture": "Imatge de perfil",
4 | "unknownUser": "Usuari desconegut",
5 | "logOut": "Tancar sessió",
6 | "testApiAuthentication": "Provar autenticació d'API",
7 | "signIn": "Connecta't a Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ca/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Comentaris",
9 | "description": "Ens encantaria escoltar els teus comentaris o ajudar-te amb qualsevol problema que estiguis experimentant.",
10 | "githubIssues": "Informa d'un problema a GitHub",
11 | "githubDiscussions": "Uneix-te a les discussions de GitHub",
12 | "discord": "Uneix-te a la nostra comunitat de Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Cerca..."
16 | },
17 | "mermaid": {
18 | "loading": "Generant diagrama mermaid...",
19 | "render_error": "No es pot renderitzar el diagrama"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ca/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Relé Humà - Si us plau, ajudeu a copiar/enganxar informació",
3 | "dialogDescription": "Si us plau, copieu el següent prompt a la IA web, després enganxeu la resposta de la IA al quadre d'entrada de sota.",
4 | "copiedToClipboard": "Copiat al porta-retalls",
5 | "aiResponse": {
6 | "label": "Si us plau, introduïu la resposta de la IA:",
7 | "placeholder": "Enganxeu aquí la resposta de la IA..."
8 | },
9 | "actions": {
10 | "cancel": "Cancel·lar",
11 | "submit": "Enviar"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/de/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/de/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/de/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Konto",
3 | "profilePicture": "Profilbild",
4 | "unknownUser": "Unbekannter Benutzer",
5 | "logOut": "Abmelden",
6 | "testApiAuthentication": "API-Authentifizierung testen",
7 | "signIn": "Mit Roo Code Cloud verbinden"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/de/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Feedback",
9 | "description": "Wir würden gerne Ihr Feedback hören oder Ihnen bei Problemen helfen, die Sie erleben.",
10 | "githubIssues": "Ein Problem auf GitHub melden",
11 | "githubDiscussions": "An GitHub-Diskussionen teilnehmen",
12 | "discord": "Treten Sie unserer Discord-Community bei"
13 | },
14 | "ui": {
15 | "search_placeholder": "Suchen..."
16 | },
17 | "mermaid": {
18 | "loading": "Mermaid-Diagramm wird generiert...",
19 | "render_error": "Diagramm kann nicht gerendert werden"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/de/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Menschliche Weiterleitung - Bitte hilf beim Kopieren/Einfügen von Informationen",
3 | "dialogDescription": "Bitte kopiere den folgenden Prompt in die Web-KI und füge dann die Antwort der KI in das Eingabefeld unten ein.",
4 | "copiedToClipboard": "In die Zwischenablage kopiert",
5 | "aiResponse": {
6 | "label": "Bitte gib die KI-Antwort ein:",
7 | "placeholder": "KI-Antwort hier einfügen..."
8 | },
9 | "actions": {
10 | "cancel": "Abbrechen",
11 | "submit": "Absenden"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/en/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/en/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/en/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Account",
3 | "profilePicture": "Profile picture",
4 | "unknownUser": "Unknown User",
5 | "logOut": "Log out",
6 | "testApiAuthentication": "Test API Authentication",
7 | "signIn": "Connect to Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/en/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Feedback",
9 | "description": "We'd love to hear your feedback or help with any issues you're experiencing.",
10 | "githubIssues": "Report an issue on GitHub",
11 | "githubDiscussions": "Join GitHub discussions",
12 | "discord": "Join our Discord community"
13 | },
14 | "ui": {
15 | "search_placeholder": "Search..."
16 | },
17 | "mermaid": {
18 | "loading": "Generating mermaid diagram...",
19 | "render_error": "Unable to Render Diagram"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/en/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Human Relay - Please Help Copy/Paste Information",
3 | "dialogDescription": "Please copy the following prompt to the web AI, then paste the AI's response in the input box below.",
4 | "copiedToClipboard": "Copied to clipboard",
5 | "aiResponse": {
6 | "label": "Please enter AI's response:",
7 | "placeholder": "Paste AI's response here..."
8 | },
9 | "actions": {
10 | "cancel": "Cancel",
11 | "submit": "Submit"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/es/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/es/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/es/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Cuenta",
3 | "profilePicture": "Foto de perfil",
4 | "unknownUser": "Usuario desconocido",
5 | "logOut": "Cerrar sesión",
6 | "testApiAuthentication": "Probar autenticación de API",
7 | "signIn": "Conectar a Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/es/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Comentarios",
9 | "description": "Nos encantaría escuchar tus comentarios o ayudarte con cualquier problema que estés experimentando.",
10 | "githubIssues": "Reportar un problema en GitHub",
11 | "githubDiscussions": "Unirse a las discusiones de GitHub",
12 | "discord": "Únete a nuestra comunidad de Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Buscar..."
16 | },
17 | "mermaid": {
18 | "loading": "Generando diagrama mermaid...",
19 | "render_error": "No se puede renderizar el diagrama"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/es/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Relevo Humano - Por favor ayude a copiar/pegar información",
3 | "dialogDescription": "Por favor copie el siguiente mensaje en la IA web, luego pegue la respuesta de la IA en el cuadro de entrada a continuación.",
4 | "copiedToClipboard": "Copiado al portapapeles",
5 | "aiResponse": {
6 | "label": "Por favor ingrese la respuesta de la IA:",
7 | "placeholder": "Pegue la respuesta de la IA aquí..."
8 | },
9 | "actions": {
10 | "cancel": "Cancelar",
11 | "submit": "Enviar"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/fr/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/fr/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/fr/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Compte",
3 | "profilePicture": "Photo de profil",
4 | "unknownUser": "Utilisateur inconnu",
5 | "logOut": "Déconnexion",
6 | "testApiAuthentication": "Tester l'authentification API",
7 | "signIn": "Se connecter à Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/fr/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Retour d'information",
9 | "description": "Nous aimerions recevoir vos commentaires ou vous aider avec tout problème que vous rencontrez.",
10 | "githubIssues": "Signaler un problème sur GitHub",
11 | "githubDiscussions": "Rejoindre les discussions GitHub",
12 | "discord": "Rejoindre notre communauté Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Rechercher..."
16 | },
17 | "mermaid": {
18 | "loading": "Génération du diagramme mermaid...",
19 | "render_error": "Impossible de rendre le diagramme"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/fr/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Relais Humain - Veuillez aider à copier/coller les informations",
3 | "dialogDescription": "Veuillez copier le texte suivant dans l'IA web, puis collez la réponse de l'IA dans la zone de saisie ci-dessous.",
4 | "copiedToClipboard": "Copié dans le presse-papiers",
5 | "aiResponse": {
6 | "label": "Veuillez saisir la réponse de l'IA :",
7 | "placeholder": "Collez la réponse de l'IA ici..."
8 | },
9 | "actions": {
10 | "cancel": "Annuler",
11 | "submit": "Envoyer"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/hi/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/hi/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/hi/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "खाता",
3 | "profilePicture": "प्रोफाइल चित्र",
4 | "unknownUser": "अज्ञात उपयोगकर्ता",
5 | "logOut": "लॉग आउट",
6 | "testApiAuthentication": "API प्रमाणीकरण का परीक्षण करें",
7 | "signIn": "Roo Code Cloud से कनेक्ट करें"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/hi/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "प्रतिक्रिया",
9 | "description": "हम आपकी प्रतिक्रिया सुनना चाहेंगे या आपके द्वारा अनुभव की जा रही किसी भी समस्या में मदद करना चाहेंगे।",
10 | "githubIssues": "GitHub पर समस्या की रिपोर्ट करें",
11 | "githubDiscussions": "GitHub चर्चाओं में शामिल हों",
12 | "discord": "हमारे Discord समुदाय में शामिल हों"
13 | },
14 | "ui": {
15 | "search_placeholder": "खोजें..."
16 | },
17 | "mermaid": {
18 | "loading": "मरमेड डायग्राम जनरेट हो रहा है...",
19 | "render_error": "डायग्राम रेंडर नहीं किया जा सकता"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/hi/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "मानव रिले - कृपया जानकारी कॉपी-पेस्ट करने में सहायता करें",
3 | "dialogDescription": "कृपया निम्नलिखित प्रॉम्प्ट को वेब AI में कॉपी करें, फिर AI की प्रतिक्रिया को नीचे दिए गए इनपुट बॉक्स में पेस्ट करें।",
4 | "copiedToClipboard": "क्लिपबोर्ड पर कॉपी किया गया",
5 | "aiResponse": {
6 | "label": "कृपया AI की प्रतिक्रिया दर्ज करें:",
7 | "placeholder": "यहाँ AI की प्रतिक्रिया पेस्ट करें..."
8 | },
9 | "actions": {
10 | "cancel": "रद्द करें",
11 | "submit": "जमा करें"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/id/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Akun",
3 | "profilePicture": "Foto profil",
4 | "unknownUser": "Pengguna Tidak Dikenal",
5 | "logOut": "Keluar",
6 | "testApiAuthentication": "Uji Autentikasi API",
7 | "signIn": "Hubungkan ke Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/id/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "rb",
4 | "million_suffix": "jt",
5 | "billion_suffix": "m"
6 | },
7 | "feedback": {
8 | "title": "Feedback",
9 | "description": "Kami ingin mendengar feedback kamu atau membantu dengan masalah yang kamu alami.",
10 | "githubIssues": "Laporkan masalah di GitHub",
11 | "githubDiscussions": "Bergabung dengan diskusi GitHub",
12 | "discord": "Bergabung dengan komunitas Discord kami"
13 | },
14 | "ui": {
15 | "search_placeholder": "Cari..."
16 | },
17 | "mermaid": {
18 | "loading": "Membuat diagram mermaid...",
19 | "render_error": "Tidak Dapat Merender Diagram"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/id/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Human Relay - Tolong Bantu Salin/Tempel Informasi",
3 | "dialogDescription": "Silakan salin prompt berikut ke web AI, lalu tempel respons AI di kotak input di bawah.",
4 | "copiedToClipboard": "Disalin ke clipboard",
5 | "aiResponse": {
6 | "label": "Silakan masukkan respons AI:",
7 | "placeholder": "Tempel respons AI di sini..."
8 | },
9 | "actions": {
10 | "cancel": "Batal",
11 | "submit": "Kirim"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/it/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/it/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/it/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Account",
3 | "profilePicture": "Immagine del profilo",
4 | "unknownUser": "Utente sconosciuto",
5 | "logOut": "Disconnetti",
6 | "testApiAuthentication": "Verifica autenticazione API",
7 | "signIn": "Connetti a Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/it/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Feedback",
9 | "description": "Ci piacerebbe ricevere il tuo feedback o aiutarti con qualsiasi problema che stai riscontrando.",
10 | "githubIssues": "Segnala un problema su GitHub",
11 | "githubDiscussions": "Partecipa alle discussioni su GitHub",
12 | "discord": "Unisciti alla nostra comunità Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Cerca..."
16 | },
17 | "mermaid": {
18 | "loading": "Generazione del diagramma mermaid...",
19 | "render_error": "Impossibile renderizzare il diagramma"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/it/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Relay Umano - Aiuta a copiare/incollare le informazioni",
3 | "dialogDescription": "Copia il seguente prompt nell'AI web, quindi incolla la risposta dell'AI nella casella di input sottostante.",
4 | "copiedToClipboard": "Copiato negli appunti",
5 | "aiResponse": {
6 | "label": "Inserisci la risposta dell'AI:",
7 | "placeholder": "Incolla qui la risposta dell'AI..."
8 | },
9 | "actions": {
10 | "cancel": "Annulla",
11 | "submit": "Invia"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ja/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/ja/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ja/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "アカウント",
3 | "profilePicture": "プロフィール画像",
4 | "unknownUser": "不明なユーザー",
5 | "logOut": "ログアウト",
6 | "testApiAuthentication": "API認証をテスト",
7 | "signIn": "Roo Code Cloud に接続"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ja/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "フィードバック",
9 | "description": "あなたのフィードバックをお聞かせいただくか、あなたが経験している問題についてお手伝いします。",
10 | "githubIssues": "GitHubで問題を報告する",
11 | "githubDiscussions": "GitHubのディスカッションに参加する",
12 | "discord": "Discordコミュニティに参加する"
13 | },
14 | "ui": {
15 | "search_placeholder": "検索..."
16 | },
17 | "mermaid": {
18 | "loading": "Mermaidダイアグラムを生成中...",
19 | "render_error": "ダイアグラムをレンダリングできません"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ja/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "ヒューマンリレー - 情報のコピー&ペーストにご協力ください",
3 | "dialogDescription": "以下のプロンプトをウェブAIにコピーし、AIの応答を下の入力ボックスにペーストしてください。",
4 | "copiedToClipboard": "クリップボードにコピーしました",
5 | "aiResponse": {
6 | "label": "AIの応答を入力してください:",
7 | "placeholder": "ここにAIの応答をペースト..."
8 | },
9 | "actions": {
10 | "cancel": "キャンセル",
11 | "submit": "送信"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ko/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/ko/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ko/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "계정",
3 | "profilePicture": "프로필 사진",
4 | "unknownUser": "알 수 없는 사용자",
5 | "logOut": "로그아웃",
6 | "testApiAuthentication": "API 인증 테스트",
7 | "signIn": "Roo Code Cloud에 연결"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ko/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "피드백",
9 | "description": "귀하의 피드백을 듣거나 경험하고 있는 문제에 대해 도움을 드리고 싶습니다.",
10 | "githubIssues": "GitHub에서 문제 보고하기",
11 | "githubDiscussions": "GitHub 토론에 참여하기",
12 | "discord": "Discord 커뮤니티에 참여하기"
13 | },
14 | "ui": {
15 | "search_placeholder": "검색..."
16 | },
17 | "mermaid": {
18 | "loading": "머메이드 다이어그램 생성 중...",
19 | "render_error": "다이어그램을 렌더링할 수 없음"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ko/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "휴먼 릴레이 - 정보 복사/붙여넣기를 도와주세요",
3 | "dialogDescription": "다음 프롬프트를 웹 AI에 복사하고, AI의 응답을 아래 입력창에 붙여넣어 주세요.",
4 | "copiedToClipboard": "클립보드에 복사됨",
5 | "aiResponse": {
6 | "label": "AI의 응답을 입력해주세요:",
7 | "placeholder": "여기에 AI의 응답을 붙여넣으세요..."
8 | },
9 | "actions": {
10 | "cancel": "취소",
11 | "submit": "제출"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/nl/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Account",
3 | "profilePicture": "Profielfoto",
4 | "unknownUser": "Onbekende gebruiker",
5 | "logOut": "Uitloggen",
6 | "testApiAuthentication": "API-authenticatie testen",
7 | "signIn": "Verbind met Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/nl/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "mrd"
6 | },
7 | "feedback": {
8 | "title": "Feedback",
9 | "description": "We horen graag uw feedback of helpen u graag met eventuele problemen die u ondervindt.",
10 | "githubIssues": "Meld een probleem op GitHub",
11 | "githubDiscussions": "Neem deel aan GitHub-discussies",
12 | "discord": "Word lid van onze Discord-community"
13 | },
14 | "ui": {
15 | "search_placeholder": "Zoeken..."
16 | },
17 | "mermaid": {
18 | "loading": "Mermaid-diagram genereren...",
19 | "render_error": "Kan diagram niet weergeven"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/nl/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Human Relay - Help alstublieft met kopiëren/plakken",
3 | "dialogDescription": "Kopieer de volgende prompt naar de web-AI en plak het antwoord van de AI in het onderstaande invoerveld.",
4 | "copiedToClipboard": "Gekopieerd naar klembord",
5 | "aiResponse": {
6 | "label": "Voer het antwoord van de AI in:",
7 | "placeholder": "Plak hier het antwoord van de AI..."
8 | },
9 | "actions": {
10 | "cancel": "Annuleren",
11 | "submit": "Verzenden"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pl/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/pl/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pl/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Konto",
3 | "profilePicture": "Zdjęcie profilowe",
4 | "unknownUser": "Nieznany użytkownik",
5 | "logOut": "Wyloguj",
6 | "testApiAuthentication": "Testuj uwierzytelnianie API",
7 | "signIn": "Połącz z Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pl/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Opinie",
9 | "description": "Chcielibyśmy usłyszeć Twoje opinie lub pomóc Ci z problemami, których doświadczasz.",
10 | "githubIssues": "Zgłoś problem na GitHubie",
11 | "githubDiscussions": "Dołącz do dyskusji na GitHubie",
12 | "discord": "Dołącz do naszej społeczności Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Szukaj..."
16 | },
17 | "mermaid": {
18 | "loading": "Generowanie diagramu mermaid...",
19 | "render_error": "Nie można renderować diagramu"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pl/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Przekaźnik Ludzki - Pomóż skopiować/wkleić informacje",
3 | "dialogDescription": "Skopiuj poniższy prompt do AI w przeglądarce, a następnie wklej odpowiedź AI do pola wprowadzania poniżej.",
4 | "copiedToClipboard": "Skopiowano do schowka",
5 | "aiResponse": {
6 | "label": "Wprowadź odpowiedź AI:",
7 | "placeholder": "Wklej tutaj odpowiedź AI..."
8 | },
9 | "actions": {
10 | "cancel": "Anuluj",
11 | "submit": "Wyślij"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pt-BR/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/pt-BR/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pt-BR/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Conta",
3 | "profilePicture": "Foto de perfil",
4 | "unknownUser": "Usuário desconhecido",
5 | "logOut": "Sair",
6 | "testApiAuthentication": "Testar Autenticação de API",
7 | "signIn": "Conectar ao Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pt-BR/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Feedback",
9 | "description": "Gostaríamos de ouvir seu feedback ou ajudar com quaisquer problemas que você esteja enfrentando.",
10 | "githubIssues": "Reportar um problema no GitHub",
11 | "githubDiscussions": "Participar das discussões no GitHub",
12 | "discord": "Junte-se à nossa comunidade no Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Pesquisar..."
16 | },
17 | "mermaid": {
18 | "loading": "Gerando diagrama mermaid...",
19 | "render_error": "Não foi possível renderizar o diagrama"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/pt-BR/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Retransmissão Humana - Ajude a copiar/colar informações",
3 | "dialogDescription": "Por favor, copie o seguinte prompt para a IA web e depois cole a resposta da IA na caixa de entrada abaixo.",
4 | "copiedToClipboard": "Copiado para a área de transferência",
5 | "aiResponse": {
6 | "label": "Digite a resposta da IA:",
7 | "placeholder": "Cole a resposta da IA aqui..."
8 | },
9 | "actions": {
10 | "cancel": "Cancelar",
11 | "submit": "Enviar"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ru/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Учетная запись",
3 | "profilePicture": "Фото профиля",
4 | "unknownUser": "Неизвестный пользователь",
5 | "logOut": "Выход",
6 | "testApiAuthentication": "Проверить аутентификацию API",
7 | "signIn": "Подключиться к Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ru/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "тыс",
4 | "million_suffix": "млн",
5 | "billion_suffix": "млрд"
6 | },
7 | "feedback": {
8 | "title": "Обратная связь",
9 | "description": "Мы будем рады услышать ваши отзывы или помочь с любыми проблемами, которые у вас возникают.",
10 | "githubIssues": "Сообщить о проблеме на GitHub",
11 | "githubDiscussions": "Присоединиться к обсуждениям на GitHub",
12 | "discord": "Присоединиться к нашему сообществу в Discord"
13 | },
14 | "ui": {
15 | "search_placeholder": "Поиск..."
16 | },
17 | "mermaid": {
18 | "loading": "Создание диаграммы mermaid...",
19 | "render_error": "Не удалось отобразить диаграмму"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/ru/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Человеческая эстафета — пожалуйста, помогите скопировать/вставить информацию",
3 | "dialogDescription": "Пожалуйста, скопируйте следующий запрос в веб-ИИ, затем вставьте ответ ИИ в поле ввода ниже.",
4 | "copiedToClipboard": "Скопировано в буфер обмена",
5 | "aiResponse": {
6 | "label": "Пожалуйста, введите ответ ИИ:",
7 | "placeholder": "Вставьте ответ ИИ сюда..."
8 | },
9 | "actions": {
10 | "cancel": "Отмена",
11 | "submit": "Отправить"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/tr/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/tr/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/tr/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Hesap",
3 | "profilePicture": "Profil resmi",
4 | "unknownUser": "Bilinmeyen kullanıcı",
5 | "logOut": "Çıkış yap",
6 | "testApiAuthentication": "API Kimlik Doğrulamayı Test Et",
7 | "signIn": "Roo Code Cloud'a bağlan"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/tr/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Geri Bildirim",
9 | "description": "Geri bildirimlerinizi duymak veya yaşadığınız sorunlarda size yardımcı olmak isteriz.",
10 | "githubIssues": "GitHub'da bir sorun bildirin",
11 | "githubDiscussions": "GitHub tartışmalarına katılın",
12 | "discord": "Discord topluluğumuza katılın"
13 | },
14 | "ui": {
15 | "search_placeholder": "Ara..."
16 | },
17 | "mermaid": {
18 | "loading": "Mermaid diyagramı oluşturuluyor...",
19 | "render_error": "Diyagram render edilemiyor"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/tr/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "İnsan Aktarımı - Lütfen bilgileri kopyalama/yapıştırmada yardımcı olun",
3 | "dialogDescription": "Lütfen aşağıdaki metni web AI'ya kopyalayın, ardından AI'nın yanıtını aşağıdaki giriş kutusuna yapıştırın.",
4 | "copiedToClipboard": "Panoya kopyalandı",
5 | "aiResponse": {
6 | "label": "Lütfen AI yanıtını girin:",
7 | "placeholder": "AI yanıtını buraya yapıştırın..."
8 | },
9 | "actions": {
10 | "cancel": "İptal",
11 | "submit": "Gönder"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/vi/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Tài khoản",
3 | "profilePicture": "Ảnh hồ sơ",
4 | "unknownUser": "Người dùng không xác định",
5 | "logOut": "Đăng xuất",
6 | "testApiAuthentication": "Kiểm tra xác thực API",
7 | "signIn": "Kết nối với Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/vi/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "Phản hồi",
9 | "description": "Chúng tôi rất muốn nghe phản hồi của bạn hoặc giúp bạn với bất kỳ vấn đề nào bạn đang gặp phải.",
10 | "githubIssues": "Báo cáo vấn đề trên GitHub",
11 | "githubDiscussions": "Tham gia thảo luận trên GitHub",
12 | "discord": "Tham gia cộng đồng Discord của chúng tôi"
13 | },
14 | "ui": {
15 | "search_placeholder": "Tìm kiếm..."
16 | },
17 | "mermaid": {
18 | "loading": "Đang tạo biểu đồ mermaid...",
19 | "render_error": "Không thể hiển thị biểu đồ"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/vi/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "Chuyển tiếp Thủ công - Vui lòng giúp Sao chép/Dán thông tin",
3 | "dialogDescription": "Vui lòng sao chép đoạn nhắc sau vào AI web, sau đó dán phản hồi của AI vào hộp nhập liệu bên dưới.",
4 | "copiedToClipboard": "Đã sao chép vào clipboard",
5 | "aiResponse": {
6 | "label": "Vui lòng nhập phản hồi của AI:",
7 | "placeholder": "Dán phản hồi của AI vào đây..."
8 | },
9 | "actions": {
10 | "cancel": "Hủy",
11 | "submit": "Gửi"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-CN/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/zh-CN/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-CN/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "账户",
3 | "profilePicture": "头像",
4 | "unknownUser": "未知用户",
5 | "logOut": "退出登录",
6 | "testApiAuthentication": "测试 API 认证",
7 | "signIn": "连接到 Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-CN/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "反馈",
9 | "description": "我们很乐意听取您的反馈或帮助您解决遇到的任何问题。",
10 | "githubIssues": "在GitHub上报告问题",
11 | "githubDiscussions": "加入GitHub讨论",
12 | "discord": "加入我们的Discord社区"
13 | },
14 | "ui": {
15 | "search_placeholder": "搜索..."
16 | },
17 | "mermaid": {
18 | "loading": "生成 Mermaid 图表中...",
19 | "render_error": "无法渲染图表"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-CN/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "人工辅助模式",
3 | "dialogDescription": "操作指南:\n1. 复制下方提示词到外部AI工具\n2. 将得到的结果粘贴至输入框",
4 | "copiedToClipboard": "已复制到剪贴板",
5 | "aiResponse": {
6 | "label": "AI响应内容:",
7 | "placeholder": "请在此处粘贴结果..."
8 | },
9 | "actions": {
10 | "cancel": "取消",
11 | "submit": "提交"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-TW/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/i18n/locales/zh-TW/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-TW/account.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "帳戶",
3 | "profilePicture": "個人圖片",
4 | "unknownUser": "未知使用者",
5 | "logOut": "登出",
6 | "testApiAuthentication": "測試 API 認證",
7 | "signIn": "連接到 Roo Code Cloud"
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-TW/common.json:
--------------------------------------------------------------------------------
1 | {
2 | "number_format": {
3 | "thousand_suffix": "k",
4 | "million_suffix": "m",
5 | "billion_suffix": "b"
6 | },
7 | "feedback": {
8 | "title": "反饋",
9 | "description": "我們很樂意聽取您的反饋或幫助您解決遇到的任何問題。",
10 | "githubIssues": "在GitHub上報告問題",
11 | "githubDiscussions": "加入GitHub討論",
12 | "discord": "加入我們的Discord社區"
13 | },
14 | "ui": {
15 | "search_placeholder": "搜尋..."
16 | },
17 | "mermaid": {
18 | "loading": "產生 Mermaid 圖表中...",
19 | "render_error": "無法渲染圖表"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/webview-ui/src/i18n/locales/zh-TW/humanRelay.json:
--------------------------------------------------------------------------------
1 | {
2 | "dialogTitle": "人工中繼 - 請協助複製貼上訊息",
3 | "dialogDescription": "請將以下提示詞複製到網頁 AI,然後將 AI 的回覆貼上到下方的輸入框中。",
4 | "copiedToClipboard": "已複製到剪貼簿",
5 | "aiResponse": {
6 | "label": "請輸入 AI 的回覆:",
7 | "placeholder": "在此貼上 AI 的回覆..."
8 | },
9 | "actions": {
10 | "cancel": "取消",
11 | "submit": "提交"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webview-ui/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { StrictMode } from "react"
2 | import { createRoot } from "react-dom/client"
3 |
4 | import "./index.css"
5 | import App from "./App"
6 | import "../node_modules/@vscode/codicons/dist/codicon.css"
7 | import "./codicon-custom.css" // kilocode_change
8 |
9 | import { getHighlighter } from "./utils/highlighter"
10 |
11 | // Initialize Shiki early to hide initialization latency (async)
12 | getHighlighter().catch((error: Error) => console.error("Failed to initialize Shiki highlighter:", error))
13 |
14 | createRoot(document.getElementById("root")!).render(
15 |
16 |
17 | ,
18 | )
19 |
--------------------------------------------------------------------------------
/webview-ui/src/kilocode/helpers.ts:
--------------------------------------------------------------------------------
1 | import { vscode } from "../utils/vscode"
2 | import debounce from "debounce"
3 |
4 | export const showSystemNotification = debounce((message: string) => {
5 | vscode.postMessage({
6 | type: "showSystemNotification",
7 | notificationOptions: {
8 | message,
9 | },
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/webview-ui/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { clsx, type ClassValue } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
--------------------------------------------------------------------------------
/webview-ui/src/oauth/urls.ts:
--------------------------------------------------------------------------------
1 | import { Package } from "@roo/package"
2 |
3 | export function getCallbackUrl(provider: string, uriScheme?: string) {
4 | return encodeURIComponent(`${uriScheme || "vscode"}://${Package.publisher}.${Package.name}/${provider}`)
5 | }
6 |
7 | export function getGlamaAuthUrl(uriScheme?: string) {
8 | return `https://glama.ai/oauth/authorize?callback_url=${getCallbackUrl("glama", uriScheme)}`
9 | }
10 |
11 | export function getOpenRouterAuthUrl(uriScheme?: string) {
12 | return `https://openrouter.ai/auth?callback_url=${getCallbackUrl("openrouter", uriScheme)}`
13 | }
14 |
15 | export function getRequestyAuthUrl(uriScheme?: string) {
16 | return `https://app.requesty.ai/oauth/authorize?callback_url=${getCallbackUrl("requesty", uriScheme)}`
17 | }
18 |
--------------------------------------------------------------------------------
/webview-ui/src/stories/AutosizeTextarea.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryObj } from "@storybook/react"
2 | import { AutosizeTextarea } from "@src/components/ui/autosize-textarea"
3 |
4 | const meta: Meta = {
5 | title: "Primitives/AutosizeTextarea",
6 | component: AutosizeTextarea,
7 | tags: ["autodocs"],
8 | args: {
9 | minHeight: 40,
10 | maxHeight: 400,
11 | placeholder: "This textarea will expand as you type.",
12 | className: "p-2",
13 | },
14 | }
15 |
16 | export default meta
17 |
18 | type Story = StoryObj
19 |
20 | export const Default: Story = {
21 | args: {},
22 | }
23 |
--------------------------------------------------------------------------------
/webview-ui/src/stories/Progress.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryObj } from "@storybook/react"
2 |
3 | import { Progress } from "@/components/ui"
4 |
5 | const meta: Meta = {
6 | title: "Primitives/Progress",
7 | component: Progress,
8 | parameters: {
9 | layout: "centered",
10 | },
11 | args: {
12 | className: "w-[300px]",
13 | },
14 | tags: ["autodocs"],
15 | }
16 |
17 | export default meta
18 |
19 | type Story = StoryObj
20 |
21 | export const Default: Story = {
22 | args: {
23 | value: 50,
24 | },
25 | }
26 |
--------------------------------------------------------------------------------
/webview-ui/src/stories/Slider.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryObj } from "@storybook/react"
2 |
3 | import { Slider } from "@/components/ui"
4 |
5 | const meta: Meta = {
6 | title: "Primitives/Slider",
7 | component: Slider,
8 | parameters: {
9 | layout: "centered",
10 | },
11 | args: {
12 | defaultValue: [50],
13 | max: 100,
14 | min: 0,
15 | step: 1,
16 | className: "w-[300px]",
17 | },
18 | tags: ["autodocs"],
19 | }
20 |
21 | export default meta
22 |
23 | type Story = StoryObj
24 |
25 | export const Default: Story = {
26 | args: {
27 | defaultValue: [50],
28 | max: 100,
29 | min: 0,
30 | step: 1,
31 | },
32 | }
33 |
--------------------------------------------------------------------------------
/webview-ui/src/stories/Welcome.mdx:
--------------------------------------------------------------------------------
1 | import { Meta } from "@storybook/blocks"
2 |
3 |
4 |
5 | # Welcome
6 |
7 | This Kilo Code storybook is used to independently develop components for the Kilo Code webview UI.
8 |
--------------------------------------------------------------------------------
/webview-ui/src/stories/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kilo-Org/kilocode/258680a6ab28ee2c0cf777f680f0af5cc41574b6/webview-ui/src/stories/assets/.gitkeep
--------------------------------------------------------------------------------
/webview-ui/src/types.d.ts:
--------------------------------------------------------------------------------
1 | // Type declarations for third-party modules
2 |
3 | declare module "knuth-shuffle-seeded" {
4 | export default function knuthShuffle(array: T[], seed: any): T[]
5 | }
6 |
--------------------------------------------------------------------------------
/webview-ui/src/utils/formatPrice.ts:
--------------------------------------------------------------------------------
1 | export const formatPrice = (price: number) => {
2 | return new Intl.NumberFormat("en-US", {
3 | style: "currency",
4 | currency: "USD",
5 | minimumFractionDigits: 2,
6 | maximumFractionDigits: 2,
7 | }).format(price)
8 | }
9 |
--------------------------------------------------------------------------------
/webview-ui/src/utils/removeLeadingNonAlphanumeric.ts:
--------------------------------------------------------------------------------
1 | // We need to remove certain leading characters from the path in order for our
2 | // leading ellipses trick to work.
3 | // However, we want to preserve all language characters (including CJK,
4 | // Cyrillic, etc.) and only remove specific punctuation that might interfere
5 | // with the ellipsis display.
6 | //
7 | // Only remove specific punctuation characters that might interfere with
8 | // ellipsis display. Keep all language characters (including CJK, Cyrillic
9 | // etc.) and numbers.
10 | export const removeLeadingNonAlphanumeric = (path: string): string => path.replace(/^[/\\:*?"<>|]+/, "")
11 |
--------------------------------------------------------------------------------
/webview-ui/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/webview-ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "esModuleInterop": true,
8 | "allowSyntheticDefaultImports": true,
9 | "strict": true,
10 | "forceConsistentCasingInFileNames": true,
11 | "noFallthroughCasesInSwitch": true,
12 | "module": "esnext",
13 | "sourceMap": true,
14 | "inlineSources": false,
15 | "moduleResolution": "bundler",
16 | "resolveJsonModule": true,
17 | "isolatedModules": true,
18 | "noEmit": true,
19 | "jsx": "react-jsx",
20 | "baseUrl": ".",
21 | "paths": {
22 | "@/*": ["./src/*"],
23 | "@src/*": ["./src/*"],
24 | "@roo/*": ["../src/shared/*"]
25 | }
26 | },
27 | "include": ["src", "../src/shared"]
28 | }
29 |
--------------------------------------------------------------------------------