Skip to content

feat: chat history search (cross-session + in-chat)#321

Merged
Kaguya-19 merged 5 commits into
mainfrom
feat/chat-history-search
Jul 2, 2026
Merged

feat: chat history search (cross-session + in-chat)#321
Kaguya-19 merged 5 commits into
mainfrom
feat/chat-history-search

Conversation

@Mingwwww

@Mingwwww Mingwwww commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add cross-session chat history search via /search (aliases: /find, /grep, /搜索) for IM channels and Web UI, plus pilotdeck chat search CLI — scans JSONL transcripts under ~/.pilotdeck/projects/*/chats/
  • Add in-chat search in the Web UI (Cmd+F / Ctrl+F) with match navigation, highlighting, and auto-scroll within the current conversation

Usage

Slash / CLI (cross-session)

/search docker deploy
/search --all kubernetes --limit 10
/search --role user 登录

pilotdeck chat search docker --project .
pilotdeck chat search error --all-projects --json

Web UI (current session)

  • Open any chat and press Cmd+F (Mac) or Ctrl+F (Windows)
  • Use ↑/↓ or Enter/Shift+Enter to jump between highlighted matches

Test plan

  • Run pilotdeck chat search <keyword> in a project with existing chats and verify matches
  • In Web UI, run /search docker and confirm formatted results appear in chat
  • In Feishu/IM, send /search <keyword> and confirm direct reply (no agent turn)
  • Open a long chat in Web UI, press Cmd+F, search a phrase, verify highlight + scroll
  • Verify --all, --limit, and --role flags on slash command

Made with Cursor

Mingwwww and others added 2 commits July 1, 2026 20:54
Add /search (with /find, /grep, 搜索 aliases) and a `pilotdeck chat`
CLI subcommand to search chat history, exposed via channel commands,
the UI command handler, and the session module.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a floating search bar in the chat pane so users can find text within
the current conversation, jump between matches, and highlight results.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/session/search/searchChatHistory.ts Fixed
): Promise<SessionFileTarget[]> {
let names: string[];
try {
names = await readdir(chatDir);
@Kaguya-19 Kaguya-19 closed this Jul 2, 2026
@Kaguya-19 Kaguya-19 reopened this Jul 2, 2026
): Matcher {
if (options.regex) {
const flags = options.caseSensitive ? "" : "i";
const pattern = new RegExp(query, flags);
@Kaguya-19 Kaguya-19 merged commit b100394 into main Jul 2, 2026
3 of 4 checks passed
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.

3 participants