Skip to content

feat: add session rename and AI auto-title generation#874

Merged
RealKai42 merged 3 commits intomainfrom
kaiyi/web/p-0203-2
Feb 3, 2026
Merged

feat: add session rename and AI auto-title generation#874
RealKai42 merged 3 commits intomainfrom
kaiyi/web/p-0203-2

Conversation

@RealKai42
Copy link
Collaborator

@RealKai42 RealKai42 commented Feb 3, 2026

Description

  • Add session rename functionality via double-click on title or right-click context menu
  • Implement AI-powered auto-title generation after first conversation turn
  • Add PATCH /sessions/{session_id} API for updating session title
  • Add POST /sessions/{session_id}/generate-title API for AI title generation

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Description

  • Add session rename functionality via double-click on title or right-click context menu
  • Implement AI-powered auto-title generation after first conversation turn
  • Add PATCH /sessions/{session_id} API for updating session title
  • Add POST /sessions/{session_id}/generate-title API for AI title generation

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Copilot AI review requested due to automatic review settings February 3, 2026 09:45
@github-actions github-actions bot changed the title feat: add session rename and AI auto-title generation feat: add session rename and AI auto-title generation || feat: add session rename and AI auto-title generation Feb 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds session renaming functionality and AI-powered auto-title generation to the Kimi CLI web interface. Users can now rename sessions via double-click on the title or through a right-click context menu, and sessions will automatically receive AI-generated titles after the first conversation turn completes.

Changes:

  • Added session rename capability through UI interactions (double-click on title or context menu)
  • Implemented automatic AI title generation after first conversation turn
  • Added backend API endpoints for manual rename (PATCH) and AI title generation (POST)

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
web/src/hooks/useSessions.ts Added renameSession and generateTitle hooks for API integration
web/src/hooks/useSessionStream.ts Added first-turn completion tracking to trigger auto-rename
web/src/features/sessions/sessions.tsx Implemented inline editing UI and context menu rename option
web/src/features/chat/components/chat-workspace-header.tsx Added double-click to rename functionality in header
web/src/features/chat/chat.tsx Prop threading for rename functionality
web/src/features/chat/chat-workspace-container.tsx Integration of auto-rename trigger on first turn complete
web/src/components/ui/context-menu.tsx New UI component (unused, has import bug)
web/src/App.tsx Wired up rename and generate-title functions
web/package.json Added radix-ui meta-package dependency
web/package-lock.json Lockfile updates for new dependencies
src/kimi_cli/web/store/sessions.py Extracted derive_session_title to support metadata.json priority
src/kimi_cli/web/models.py Added request/response models for update and generate-title
src/kimi_cli/web/app.py Added configurable logging setup
src/kimi_cli/web/api/sessions.py Implemented PATCH and POST endpoints for session operations
Makefile Enabled DEBUG logging for web backend development
Files not reviewed (1)
  • web/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


const trimmedTitle = editingTitle.trim();
if (!trimmedTitle) {
setIsEditing(false);
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

When the trimmed title is empty, the function resets isEditing but doesn't reset editingTitle. This could leave stale data in the editingTitle state. For consistency and to avoid potential issues, you should also call setEditingTitle("") here, or use the handleCancelEdit function which does both.

Suggested change
setIsEditing(false);
setIsEditing(false);
setEditingTitle("");

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 5 additional flags in Devin Review.

Open in Devin Review

@RealKai42 RealKai42 changed the title feat: add session rename and AI auto-title generation || feat: add session rename and AI auto-title generation feat: add session rename and AI auto-title generation Feb 3, 2026
@RealKai42 RealKai42 merged commit 8aaaf74 into main Feb 3, 2026
10 checks passed
@RealKai42 RealKai42 deleted the kaiyi/web/p-0203-2 branch February 3, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants