Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 60 additions & 50 deletions apps/kilocode-docs/docs/advanced-usage/code-reviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
title: Code Reviews
sidebar_label: Code Reviews
---

Kilo's **Code Reviews** feature automatically analyzes your pull requests using an AI model of your choice. It can review code the moment a PR is opened or updated, surface issues, and provide structured feedback across performance, security, style, and test coverage.

---

## What Code Reviews Enable

- Automated AI review on every pull request
Copy link

Choose a reason for hiding this comment

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

are these necessary?

- Consistent feedback based on your team’s standards
- Automatic detection of bugs, security risks, and anti-patterns
- Deep reasoning over changed files, diffs, and repo context
- Automated AI review on every pull request
- Consistent feedback based on your team’s standards
- Automatic detection of bugs, security risks, and anti-patterns
- Deep reasoning over changed files, diffs, and repo context
- Customizable review strictness and focus areas

---
Expand All @@ -36,22 +37,22 @@ Before enabling Code Reviews:

## How to Use

1. Go to the **Review Agent** section in your Kilo Code [personal](https://app.kilo.ai/profile) or [Organization](https://app.kilo.ai/organizations) dashboard.
2. Toggle **Enable AI Code Review** to automatically review PRs on open/update.
3. Choose an **AI Model** (e.g., Grok Code Fast 1).
1. Go to the **Review Agent** section in your Kilo Code [personal](https://app.kilo.ai/profile) or [Organization](https://app.kilo.ai/organizations) dashboard.
2. Toggle **Enable AI Code Review** to automatically review PRs on open/update.
3. Choose an **AI Model** (e.g., Grok Code Fast 1).
4. Select a **Review Style**:
- Strict
- Balanced
- Lenient
5. Choose which **repositories** should receive automatic reviews.
- Strict
- Balanced
- Lenient
5. Choose which **repositories** should receive automatic reviews.
6. Optionally select **Focus Areas** such as:
- Security vulnerabilities
- Performance issues
- Bug detection
- Code style
- Test coverage
- Documentation gaps
7. Set a **maximum review time** (5–30 minutes).
- Security vulnerabilities
- Performance issues
- Bug detection
- Code style
- Test coverage
- Documentation gaps
7. Set a **maximum review time** (5–30 minutes).
8. Add **custom instructions** to shape how the agent reviews your code.

Once configured, the Review Agent will run automatically on PR events.
Expand All @@ -65,11 +66,11 @@ Once configured, the Review Agent will run automatically on PR events.
2. The selected model analyzes all changes.
3. The agent applies your chosen review style and focus areas.
4. It generates a structured review with:
- Inline comments
- Summary findings
- Suggested fixes
- Risk and severity tagging
- Reviews respect the **maximum time limit** you set.
- Inline comments
- Summary findings
- Suggested fixes
- Risk and severity tagging
- Reviews respect the **maximum time limit** you set.
- Only repositories you’ve selected will trigger automatic analysis.

Reviews are posted directly in GitHub as if coming from a team reviewer.
Expand All @@ -79,18 +80,21 @@ Reviews are posted directly in GitHub as if coming from a team reviewer.
## Review Styles

### Strict
- Flags all potential issues
- Emphasizes correctness, quality, and security

- Flags all potential issues
- Emphasizes correctness, quality, and security
- Useful for mission-critical code paths or production services

### Balanced
- Most popular option
- Prioritizes clarity and practicality

- Most popular option
- Prioritizes clarity and practicality
- Surfaces important issues without overwhelming noise

### Lenient
- Flags only critical issues
- Encouraging and lightweight

- Flags only critical issues
- Encouraging and lightweight
- Ideal for exploratory PRs, prototypes, or early WIP reviews

---
Expand All @@ -100,33 +104,39 @@ Reviews are posted directly in GitHub as if coming from a team reviewer.
You can tailor what the Review Agent pays attention to:

### Security Vulnerabilities
- SQL injection
- XSS
- Unsafe APIs
- Secrets and credential exposure

- SQL injection
- XSS
- Unsafe APIs
- Secrets and credential exposure

### Performance Issues
- N+1 queries
- Inefficient loops
- High-complexity functions

- N+1 queries
- Inefficient loops
- High-complexity functions

### Bug Detection
- Logic errors
- Edge-case failures
- Incorrect assumptions

- Logic errors
- Edge-case failures
- Incorrect assumptions

### Code Style
- Formatting
- Naming conventions
- Readability improvements

- Formatting
- Naming conventions
- Readability improvements

### Test Coverage
- Missing or inadequate tests
- Uncovered logic paths

- Missing or inadequate tests
- Uncovered logic paths

### Documentation
- Missing comments
- Unclear APIs

- Missing comments
- Unclear APIs

---

Expand All @@ -145,8 +155,8 @@ The Review Agent is ideal for:

## Limitations and Guidance

- Reviews can run for **up to 30 minutes** depending on your setting.
- The agent reviews **only the changed files**, not the entire repository.
- Some highly dynamic or domain-specific code may require additional context in custom instructions.
- The agent will only run on **selected repositories**.
- Reviews can run for **up to 30 minutes** depending on your setting.
- The agent reviews **only the changed files**, not the entire repository.
- Some highly dynamic or domain-specific code may require additional context in custom instructions.
- The agent will only run on **selected repositories**.
- During beta, review capacity may be throttled for extremely large PRs.
27 changes: 14 additions & 13 deletions apps/kilocode-docs/docs/advanced-usage/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Kilo Integrations lets you connect your GitHub account (and soon, GitLab and Bit

## What You Can Do With Integrations

- **Connect GitHub to Kilo Code** in a few clicks
- **Authorize the KiloConnect App** for repo access
- **Enable advanced features** like Cloud Agents and Kilo Deploy
- **Connect GitHub to Kilo Code** in a few clicks
- **Authorize the KiloConnect App** for repo access
- **Enable advanced features** like Cloud Agents and Kilo Deploy

---

Expand All @@ -31,7 +31,6 @@ Before connecting:

Go to your **Personal** or **Organization Dashboard**, and navigate to the [Integrations](https://app.kilo.ai/integrations) tab


### 2. Start the Connection Flow

1. Click **Configure** on the GitHub panel.
Expand All @@ -42,7 +41,7 @@ Go to your **Personal** or **Organization Dashboard**, and navigate to the [Inte

GitHub will ask which repositories you want Kilo to access:

- **All repositories** (recommended if you plan to use Cloud Agents or Deploy across multiple projects)
Copy link

Choose a reason for hiding this comment

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

I do not think these changes should be part of this PR.

- **All repositories** (recommended if you plan to use Cloud Agents or Deploy across multiple projects)
- **Only selected repositories** (choose specific repos)

Click **Install & Authorize** to continue.
Expand All @@ -62,16 +61,19 @@ Once approved:
Once GitHub is connected, the following features will be enabled in Kilo:

### Cloud Agents

- Run Kilo Code in the cloud from any device
- Auto-create branches and push work continuously
- Work from anywhere while keeping your repo in sync
- Auto-create branches and push work continuously
- Work from anywhere while keeping your repo in sync

### Kilo Deploy
- Deploy Next.js 14 & 15 apps directly from Kilo
- Trigger rebuilds automatically on push

- Deploy Next.js 14 & 15 apps directly from Kilo
- Trigger rebuilds automatically on push
- Manage deployment logs and history

### Upcoming:

- **GitLab Integration**
- **Bitbucket Integration**

Expand All @@ -81,9 +83,9 @@ Once GitHub is connected, the following features will be enabled in Kilo:

From the same **Integrations** page, you can click "Manage on Github" to:

- View the GitHub account you connected
- Update which repositories Kilo has access to
- Disconnect GitHub entirely
- View the GitHub account you connected
- Update which repositories Kilo has access to
- Disconnect GitHub entirely
- Reauthorize the app if permissions change

---
Expand All @@ -98,4 +100,3 @@ You may need an admin to approve installing GitHub Apps.

**“Cloud Agents or Deploy can’t access my repo.”**
Revisit the GitHub app settings and confirm the app has the correct repo scope.

Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ Note that available settings vary by provider and model. Each provider offers di
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-2.png" alt="Provider selection dropdown" width="550" />
- Enter API key

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-3.png" alt="API key entry field" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-3.png" alt="API key entry field" width="550" />

- Choose a model

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-8.png" alt="Model selection interface" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-8.png" alt="Model selection interface" width="550" />
Copy link

Choose a reason for hiding this comment

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

I think these changes are not necessary and this file should not be touched.


- Adjust model parameters

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-5.png" alt="Model parameter adjustment controls" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-5.png" alt="Model parameter adjustment controls" width="550" />

### Switching Profiles

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ API 配置配置文件允许您创建和切换不同的 AI 设置集。每个配

- 选择您的 API 提供商

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-2.png" alt="提供商选择下拉菜单" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-2.png" alt="提供商选择下拉菜单" width="550" />

- 输入 API 密钥

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-3.png" alt="API 密钥输入字段" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-3.png" alt="API 密钥输入字段" width="550" />

- 选择模型

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-8.png" alt="模型选择界面" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-8.png" alt="模型选择界面" width="550" />

- 调整模型参数

<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-5.png" alt="模型参数调整控件" width="550" />
<img src="/docs/img/api-configuration-profiles/api-configuration-profiles-5.png" alt="模型参数调整控件" width="550" />

### 切换配置文件

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Kilo Code 使用一个影子 Git 仓库(独立于您的主版本控制系统

- **恢复文件和任务** - 恢复工作区文件并删除所有后续对话消息。当您希望将代码和对话完全重置回检查点的时间点时使用。此选项需要在对话框中进行确认,因为它无法撤消。

<img src="/docs/img/checkpoints/checkpoints-9.png" alt="恢复文件和任务检查点的确认对话框" width="300" />
<img src="/docs/img/checkpoints/checkpoints-9.png" alt="恢复文件和任务检查点的确认对话框" width="300" />

### 限制和注意事项

Expand Down
1 change: 1 addition & 0 deletions cli/src/constants/providers/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const PROVIDER_LABELS: Record<ProviderName, string> = {
"virtual-quota-fallback": "Virtual Quota Fallback",
"human-relay": "Human Relay",
"fake-ai": "Fake AI",
oca: "Oracle Code Assist",
ovhcloud: "OVHcloud AI Endpoints",
inception: "Inception",
synthetic: "Synthetic",
Expand Down
3 changes: 3 additions & 0 deletions cli/src/constants/providers/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export type RouterName =
| "deepinfra"
| "vercel-ai-gateway"
| "ovhcloud"
| "oca"

/**
* ModelInfo interface - mirrors the one from packages/types/src/model.ts
Expand Down Expand Up @@ -132,6 +133,7 @@ export const PROVIDER_TO_ROUTER_NAME: Record<ProviderName, RouterName | null> =
"io-intelligence": "io-intelligence",
"vercel-ai-gateway": "vercel-ai-gateway",
ovhcloud: "ovhcloud",
oca: "oca",
// Providers without dynamic model support
anthropic: null,
bedrock: null,
Expand Down Expand Up @@ -183,6 +185,7 @@ export const PROVIDER_MODEL_FIELD: Record<ProviderName, string | null> = {
"io-intelligence": "ioIntelligenceModelId",
"vercel-ai-gateway": "vercelAiGatewayModelId",
ovhcloud: "ovhCloudAiEndpointsModelId",
oca: "apiModelId",
// Providers without dynamic model support
anthropic: null,
bedrock: null,
Expand Down
1 change: 1 addition & 0 deletions cli/src/constants/providers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ export const PROVIDER_DEFAULT_MODELS: Record<ProviderName, string> = {
unbound: "gpt-4o",
requesty: "gpt-4o",
roo: "gpt-4o",
oca: "auto",
"vercel-ai-gateway": "gpt-4o",
"virtual-quota-fallback": "gpt-4o",
"human-relay": "human",
Expand Down
1 change: 1 addition & 0 deletions cli/src/constants/providers/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const PROVIDER_REQUIRED_FIELDS: Record<ProviderName, string[]> = {
ovhcloud: ["ovhCloudAiEndpointsApiKey", "ovhCloudAiEndpointsModelId"],
inception: ["inceptionLabsApiKey", "inceptionLabsModelId"],
synthetic: ["syntheticApiKey", "apiModelId"],
oca: [],
"sap-ai-core": ["sapAiCoreServiceKey", "sapAiCoreResourceGroup", "sapAiCoreDeploymentId", "sapAiCoreModelId"],
// Special cases handled separately in handleSpecialValidations
vertex: [], // Has special validation logic (either/or fields)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"brace-expansion": ">=2.0.2",
"form-data": ">=4.0.4",
"bluebird": ">=3.7.2",
"type-fest": "2.19.0"
"type-fest": "2.19.0",
"fsevents": "^2.3.3"
}
}
}
4 changes: 2 additions & 2 deletions packages/types/src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* Enable model selection for autocomplete in development mode.
* This allows developers to test different models for autocomplete functionality.
*/
export const MODEL_SELECTION_ENABLED = process.env.NODE_ENV === "development";
export const MODEL_SELECTION_ENABLED = process.env.NODE_ENV === "development"

/**
* Enable the Agent Manager feature in development mode.
* This allows developers to test the multi-agent orchestration functionality.
*/
export const AGENT_MANAGER_ENABLED = process.env.NODE_ENV === "development";
export const AGENT_MANAGER_ENABLED = process.env.NODE_ENV === "development"
Copy link

Choose a reason for hiding this comment

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

why?

1 change: 1 addition & 0 deletions packages/types/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const modelInfoSchema = z.object({
cacheWritesPrice: z.number().optional(),
cacheReadsPrice: z.number().optional(),
description: z.string().optional(),
banner: z.string().optional(),
// Default effort value for models that support reasoning effort
reasoningEffort: reasoningEffortExtendedSchema.optional(),
minTokensPerCachePoint: z.number().optional(),
Expand Down
Loading