Skip to content

feat: add 18 Cursor-like features to chatbot (regenerate, edit, diff, search, slash commands, pinned files, export, Ctrl+K)#7

Merged
codomium merged 5 commits intomainfrom
copilot/upgrade-extension-to-v1-2-0
Apr 17, 2026
Merged

feat: add 18 Cursor-like features to chatbot (regenerate, edit, diff, search, slash commands, pinned files, export, Ctrl+K)#7
codomium merged 5 commits intomainfrom
copilot/upgrade-extension-to-v1-2-0

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 17, 2026

Extends the existing Claude Code chat panel with the core features that make Cursor feel "pro" — covering message editing/regeneration, diff-before-apply, context persistence, conversation tooling, and editor integration.

High Impact

  • Regenerate ↺_regenPrompt stored on each assistant div; regenerateFrom() trims sessionMessages and re-sends
  • Edit user message ✏ — pencil button on hover; inline textarea replaces bubble, truncates session history, re-sends on confirm
  • Inline diff viewcomputeDiff() (LCS/O(nm)) + buildDiffView() replace the plain code preview in the apply modal; diff data arrives via new getActiveFileContentactiveFileContent round-trip
  • Drag-and-drop filesdragover/drop on #input-wrapper; filters by code extension
  • Up-arrow recall — empty input + fills textarea with lastUserMessage

Medium Impact

  • Pinned context files📎 per chip; stored in openClaudeCode.pinnedFiles config; restored automatically on New Chat and sessionCleared
  • Export as Markdown — header button serializes sessionMessagesexportConversation message → VS Code save dialog
  • Context window usage barMODEL_CONTEXT map keyed by model id; updateContextBar() called on every tokenUpdate; hidden until tokens > 0
  • History rename / delete — inline prompt()/confirm()renameSession / deleteSession handlers in extension, globalState updated, list refreshed
  • Ctrl+F search — highlights matching .msg-user / .msg-assistant divs; prev/next scroll; Esc closes
  • Auto-scroll lockautoScroll flag guards scrollToBottom(); header button toggles; re-enables automatically when user scrolls to bottom
  • Slash commands/clear /model /export /help /pin reuse the existing #autocomplete dropdown and showAutocomplete/hideAutocomplete path

Lower Impact / Editor Integration

  • Image pastepaste event → FileReader.readAsDataURL → chip (data URI validated against /^data:image\/[a-z]+;base64,/ before img.src assignment)
  • @codebase mention — input handler replaces token with a chip; useCodebase flag forwarded in send message
  • Ctrl+K inline edit — new openClaudeCode.inlineEdit command reads editor selection + filename, focuses panel, sends inlineEditRequest; handler pre-fills input with fenced code + instruction prompt
  • KeybindingsCtrl+Alt+C focuses panel; Ctrl+K (when editorTextFocus) triggers inline edit
  • openClaudeCode.pinnedFiles config property added to package.json contributions

Copilot AI and others added 5 commits April 17, 2026 21:40
Features added:
1. Regenerate (↺) button on assistant messages
2. Edit (✏) button on user messages with inline editor
3. Inline diff view (LCS) when applying code to active file
4. Drag-and-drop code files onto input area
5. Up-arrow recalls last sent message when input is empty
6. Pinned context files (📎) — survive New Chat sessions
7. Export conversation as Markdown (⬇ Export button)
8. Context window usage bar below stats (per-model limits)
9. Rename (✏) and Delete (🗑) buttons on history sessions
10. Ctrl+F conversation search with next/prev navigation
11. Auto-scroll lock/unlock (header button + scroll detection)
12. Slash commands (/clear /model /export /help /pin)
13. Image/screenshot paste creates preview chip
14. @codebase mention creates context chip
15. Multi-root workspace (findFiles already supports it)
16. Ctrl+Alt+C focus panel keybinding
17. Ctrl+K inline edit from editor (inlineEditRequest)
18. New inlineEdit command + pinnedFiles config

Agent-Logs-Url: https://github.com/codomium/CODE/sessions/2870ea5c-5132-4837-a6a0-036ebe45f864

Co-authored-by: codomium <255525663+codomium@users.noreply.github.com>
@codomium codomium marked this pull request as ready for review April 17, 2026 22:59
@codomium codomium merged commit 82d1a72 into main Apr 17, 2026
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