Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Only write entries that are worth mentioning to users.

## Unreleased

- Web: Fix scrollable file list overflow in the toolbar changes panel
- Core: Add `compaction_trigger_ratio` config option (default `0.85`) to control when auto-compaction triggers — compaction now fires when context usage reaches the configured ratio or when remaining space falls below `reserved_context_size`, whichever comes first
- Core: Support custom instructions in `/compact` command (e.g., `/compact keep database discussions`) to guide what the compaction preserves
- Web: Add URL action parameters (`?action=create` to open create-session dialog, `?action=create-in-dir&workDir=xxx` to create a session directly) for external integrations, and support Cmd/Ctrl+Click on new-session buttons to open session creation in a new browser tab
Expand Down
18 changes: 17 additions & 1 deletion docs/en/reference/kimi-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Web UI provides a convenient session management interface:

- **Session list**: View all historical sessions, including session title and working directory
- **Session search**: Quickly filter sessions by title or working directory
- **Create session**: Create a new session with a specified working directory; if the specified path doesn't exist, you will be prompted to confirm creating the directory
- **Create session**: Create a new session with a specified working directory; if the specified path doesn't exist, you will be prompted to confirm creating the directory. Supports Cmd/Ctrl+Click on new-session buttons to open session creation in a new tab
- **Switch session**: Switch to different sessions with one click
- **Session fork**: Create a branching session from any assistant response, exploring different directions without affecting the original session
- **Session archive**: Sessions older than 15 days are automatically archived. You can also archive manually. Archived sessions don't appear in the main list but can be unarchived at any time
Expand Down Expand Up @@ -293,6 +293,22 @@ Web UI uses responsive design and displays well on screens of different sizes:
Responsive layout improved in version 1.6 with enhanced hover effects and better layout handling.
:::

### URL action parameters

Web UI supports URL parameters to trigger specific actions, making it easy to integrate from external tools or scripts:

| Parameter | Description |
|-----------|-------------|
| `?action=create` | Open the create-session dialog |
| `?action=create-in-dir&workDir=<path>` | Directly create a session in the specified working directory |

Examples:

```
http://127.0.0.1:5494?action=create
http://127.0.0.1:5494?action=create-in-dir&workDir=/path/to/project
```

## Examples

### Local use
Expand Down
1 change: 1 addition & 0 deletions docs/en/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This page documents the changes in each Kimi Code CLI release.

## Unreleased

- Web: Fix scrollable file list overflow in the toolbar changes panel
- Core: Add `compaction_trigger_ratio` config option (default `0.85`) to control when auto-compaction triggers — compaction now fires when context usage reaches the configured ratio or when remaining space falls below `reserved_context_size`, whichever comes first
- Core: Support custom instructions in `/compact` command (e.g., `/compact keep database discussions`) to guide what the compaction preserves
- Web: Add URL action parameters (`?action=create` to open create-session dialog, `?action=create-in-dir&workDir=xxx` to create a session directly) for external integrations, and support Cmd/Ctrl+Click on new-session buttons to open session creation in a new browser tab
Expand Down
18 changes: 17 additions & 1 deletion docs/zh/reference/kimi-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Web UI 提供了便捷的会话管理界面:

- **会话列表**:查看所有历史会话,包括会话标题和工作目录
- **会话搜索**:通过标题或工作目录快速筛选会话
- **创建会话**:指定工作目录创建新会话;如果指定的路径不存在,会提示确认是否创建目录
- **创建会话**:指定工作目录创建新会话;如果指定的路径不存在,会提示确认是否创建目录。支持 Cmd/Ctrl+点击新建会话按钮在新标签页中打开会话创建
- **切换会话**:一键切换到不同的会话
- **会话分支**:从任意 Assistant 回复处创建分支会话,在不影响原会话的情况下探索不同方向
- **会话归档**:超过 15 天的会话会自动归档,你也可以手动归档。归档的会话不会出现在主列表中,但可以随时取消归档
Expand Down Expand Up @@ -293,6 +293,22 @@ Web UI 采用响应式设计,可以在不同尺寸的屏幕上良好显示:
响应式布局改进于 1.6 版本,增强了悬停效果和布局处理。
:::

### URL 操作参数

Web UI 支持通过 URL 参数触发特定操作,方便从外部工具或脚本中集成:

| 参数 | 说明 |
|------|------|
| `?action=create` | 打开创建会话对话框 |
| `?action=create-in-dir&workDir=<path>` | 直接在指定工作目录下创建会话 |

示例:

```
http://127.0.0.1:5494?action=create
http://127.0.0.1:5494?action=create-in-dir&workDir=/path/to/project
```

## 示例

### 本地使用
Expand Down
1 change: 1 addition & 0 deletions docs/zh/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## 未发布

- Web:修复工具栏变更面板中文件列表滚动溢出的问题
- Core:新增 `compaction_trigger_ratio` 配置项(默认 `0.85`),用于控制自动压缩的触发时机——当上下文用量达到配置比例或剩余空间低于 `reserved_context_size` 时触发压缩,以先满足的条件为准
- Core:`/compact` 命令支持自定义指令(如 `/compact keep database discussions`),可指导压缩时重点保留的内容
- Web:新增 URL 操作参数(`?action=create` 打开创建会话对话框,`?action=create-in-dir&workDir=xxx` 直接创建会话)用于外部集成,支持 Cmd/Ctrl+点击新建会话按钮在新标签页中打开会话创建
Expand Down
5 changes: 4 additions & 1 deletion web/src/features/chat/components/prompt-toolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ export const PromptToolbar = memo(function PromptToolbarComponent({
<div className={cn("w-full px-1 sm:px-2 flex flex-col gap-1 mb-2", isGitDiffLoading && "opacity-70")}>
{/* ── Expanded panel ── */}
{activeTab && (
<div className="max-h-32 overflow-y-auto rounded-md border border-border bg-background py-1 px-0.5">
<div className={cn(
"rounded-md border border-border bg-background",
activeTab !== "changes" && "max-h-32 overflow-y-auto py-1 px-0.5",
)}>
{activeTab === "queue" && <ToolbarQueuePanel queue={queue} />}
{activeTab === "changes" && stats && (
<ToolbarChangesPanel stats={stats} workDir={workDir} />
Expand Down
50 changes: 26 additions & 24 deletions web/src/features/chat/components/prompt-toolbar/toolbar-changes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,41 @@ export const ToolbarChangesPanel = memo(function ToolbarChangesPanelComponent({
);

return (
<>
{stats.files?.map((file) => (
<div
key={file.path}
className="group/file flex items-center gap-2 px-3 py-1 text-xs hover:bg-muted/50 transition-colors"
>
<FileIcon className="size-3 flex-shrink-0 text-muted-foreground" />
<span className="flex items-center gap-1 flex-shrink-0 text-[11px]">
{file.additions > 0 && (
<span className="text-emerald-600 dark:text-emerald-400">+{file.additions}</span>
<div className="flex flex-col max-h-32">
<div className="overflow-y-auto py-1 px-0.5 flex-1 min-h-0">
{stats.files?.map((file) => (
<div
key={file.path}
className="group/file flex items-center gap-2 px-3 py-1 text-xs hover:bg-muted/50 transition-colors"
>
<FileIcon className="size-3 flex-shrink-0 text-muted-foreground" />
<span className="flex items-center gap-1 flex-shrink-0 text-[11px]">
{file.additions > 0 && (
<span className="text-emerald-600 dark:text-emerald-400">+{file.additions}</span>
)}
{file.deletions > 0 && <span className="text-destructive">-{file.deletions}</span>}
</span>
<span className="truncate text-muted-foreground" title={file.path}>
{file.path}
</span>
Comment on lines +48 to +50
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

truncate inside a flex row typically won’t actually truncate unless the truncating element is allowed to shrink (e.g., min-w-0 and often flex-1). As written, long file.path values can still force horizontal overflow rather than ellipsize. Consider adding min-w-0 (and flex-1 if you want it to take remaining space) to this span so paths reliably truncate.

Copilot uses AI. Check for mistakes.
{workDir && (
<div className="flex-shrink-0 hidden lg:block opacity-0 group-hover/file:opacity-100 transition-opacity duration-150">
<OpenInButton path={getFilePath(file.path)} />
</div>
)}
{file.deletions > 0 && <span className="text-destructive">-{file.deletions}</span>}
</span>
<span className="truncate text-muted-foreground" title={file.path}>
{file.path}
</span>
{workDir && (
<div className="flex-shrink-0 hidden lg:block opacity-0 group-hover/file:opacity-100 transition-opacity duration-150">
<OpenInButton path={getFilePath(file.path)} />
</div>
)}
</div>
))}
</div>
))}
</div>
{workDir && (
<div className="group/folder sticky bottom-0 flex items-center gap-1.5 px-3 py-1.5 text-[11px] border-t bg-muted/40">
<div className="group/folder flex items-center gap-1.5 px-3 py-1.5 text-[11px] border-t bg-muted/40 flex-shrink-0">
<FolderOpenIcon className="size-3 flex-shrink-0 text-muted-foreground/70" />
<span className="truncate text-muted-foreground/70">{workDir}</span>
<div className="flex-shrink-0 hidden lg:block opacity-0 group-hover/folder:opacity-100 transition-opacity duration-150">
Comment on lines 61 to 63
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

Same truncation issue as above: this truncate span is in a flex container, but without min-w-0 it may not shrink, so long workDir values can overflow the panel horizontally. Add min-w-0 (and/or make it flex-1) to ensure ellipsis works consistently.

Copilot uses AI. Check for mistakes.
<OpenInButton path={workDir} />
</div>
</div>
)}
</>
</div>
);
});

Expand Down
Loading