diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f7124e2f..383b83d5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docs/en/reference/kimi-web.md b/docs/en/reference/kimi-web.md index 5af099b42..770d14bf2 100644 --- a/docs/en/reference/kimi-web.md +++ b/docs/en/reference/kimi-web.md @@ -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 @@ -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=` | 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 diff --git a/docs/en/release-notes/changelog.md b/docs/en/release-notes/changelog.md index 687b06ab4..fe79f9ccf 100644 --- a/docs/en/release-notes/changelog.md +++ b/docs/en/release-notes/changelog.md @@ -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 diff --git a/docs/zh/reference/kimi-web.md b/docs/zh/reference/kimi-web.md index 2eea48daa..d68820b15 100644 --- a/docs/zh/reference/kimi-web.md +++ b/docs/zh/reference/kimi-web.md @@ -168,7 +168,7 @@ Web UI 提供了便捷的会话管理界面: - **会话列表**:查看所有历史会话,包括会话标题和工作目录 - **会话搜索**:通过标题或工作目录快速筛选会话 -- **创建会话**:指定工作目录创建新会话;如果指定的路径不存在,会提示确认是否创建目录 +- **创建会话**:指定工作目录创建新会话;如果指定的路径不存在,会提示确认是否创建目录。支持 Cmd/Ctrl+点击新建会话按钮在新标签页中打开会话创建 - **切换会话**:一键切换到不同的会话 - **会话分支**:从任意 Assistant 回复处创建分支会话,在不影响原会话的情况下探索不同方向 - **会话归档**:超过 15 天的会话会自动归档,你也可以手动归档。归档的会话不会出现在主列表中,但可以随时取消归档 @@ -293,6 +293,22 @@ Web UI 采用响应式设计,可以在不同尺寸的屏幕上良好显示: 响应式布局改进于 1.6 版本,增强了悬停效果和布局处理。 ::: +### URL 操作参数 + +Web UI 支持通过 URL 参数触发特定操作,方便从外部工具或脚本中集成: + +| 参数 | 说明 | +|------|------| +| `?action=create` | 打开创建会话对话框 | +| `?action=create-in-dir&workDir=` | 直接在指定工作目录下创建会话 | + +示例: + +``` +http://127.0.0.1:5494?action=create +http://127.0.0.1:5494?action=create-in-dir&workDir=/path/to/project +``` + ## 示例 ### 本地使用 diff --git a/docs/zh/release-notes/changelog.md b/docs/zh/release-notes/changelog.md index e72938127..69880af63 100644 --- a/docs/zh/release-notes/changelog.md +++ b/docs/zh/release-notes/changelog.md @@ -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+点击新建会话按钮在新标签页中打开会话创建 diff --git a/web/src/features/chat/components/prompt-toolbar/index.tsx b/web/src/features/chat/components/prompt-toolbar/index.tsx index ccceef6a0..4fd6048e4 100644 --- a/web/src/features/chat/components/prompt-toolbar/index.tsx +++ b/web/src/features/chat/components/prompt-toolbar/index.tsx @@ -81,7 +81,10 @@ export const PromptToolbar = memo(function PromptToolbarComponent({
{/* ── Expanded panel ── */} {activeTab && ( -
+
{activeTab === "queue" && } {activeTab === "changes" && stats && ( diff --git a/web/src/features/chat/components/prompt-toolbar/toolbar-changes.tsx b/web/src/features/chat/components/prompt-toolbar/toolbar-changes.tsx index 333fe032f..416e47daa 100644 --- a/web/src/features/chat/components/prompt-toolbar/toolbar-changes.tsx +++ b/web/src/features/chat/components/prompt-toolbar/toolbar-changes.tsx @@ -31,31 +31,33 @@ export const ToolbarChangesPanel = memo(function ToolbarChangesPanelComponent({ ); return ( - <> - {stats.files?.map((file) => ( -
- - - {file.additions > 0 && ( - +{file.additions} +
+
+ {stats.files?.map((file) => ( +
+ + + {file.additions > 0 && ( + +{file.additions} + )} + {file.deletions > 0 && -{file.deletions}} + + + {file.path} + + {workDir && ( +
+ +
)} - {file.deletions > 0 && -{file.deletions}} - - - {file.path} - - {workDir && ( -
- -
- )} -
- ))} +
+ ))} +
{workDir && ( -
+
{workDir}
@@ -63,7 +65,7 @@ export const ToolbarChangesPanel = memo(function ToolbarChangesPanelComponent({
)} - +
); });