Skip to content

feat: interactive search selection#20

Merged
vraspar merged 1 commit intomainfrom
feat/interactive-search
Mar 25, 2026
Merged

feat: interactive search selection#20
vraspar merged 1 commit intomainfrom
feat/interactive-search

Conversation

@vraspar
Copy link
Owner

@vraspar vraspar commented Mar 25, 2026

After \�rain search\ shows results, prompts user to select an entry to view:

\
$ brain search kubernetes
Found 3 results:
[1] k8s-deployment-guide — Kubernetes Deployment Guide
[2] helm-charts — Helm Chart Patterns
[3] ci-pipeline — CI Pipeline Setup

Show entry (1-3, or q to quit): 2
\\

Displays full entry with related entries, records read receipt.

Guards:

  • Text mode only (not --format json)
  • TTY only (\process.stdout.isTTY)
  • --no-interactive\ flag to disable

Uses
ode:readline/promises\ (same as brain init wizard). 4 new tests.

After brain search shows results, prompt user to select one:
  [1] k8s-deployment-guide — Kubernetes Deployment Guide
  [2] helm-charts — Helm Chart Patterns
  Show entry (1-3, or q to quit): 1

Displays full entry with related entries (same as brain show).
Records a read receipt for the selected entry.

- Only in text mode (not --format json)
- Skipped when stdout is not a TTY (piped output)
- Skipped with --no-interactive flag
- Uses node:readline/promises (same pattern as brain init)

4 new tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vraspar vraspar merged commit e5cfabe into main Mar 25, 2026
4 checks passed
@vraspar vraspar deleted the feat/interactive-search branch March 25, 2026 22:40
vraspar added a commit that referenced this pull request Mar 26, 2026
README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vraspar added a commit that referenced this pull request Mar 26, 2026
)

README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vraspar added a commit that referenced this pull request Mar 26, 2026
README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vraspar added a commit that referenced this pull request Mar 26, 2026
* docs: add missing commands to README, update CHANGELOG with PR refs

README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: serve startup message and table title truncation

serve: prints startup message to stderr ('Brain MCP server running
on stdio...') so users know it started. Uses stderr to avoid
interfering with MCP stdio transport on stdout.

tables: truncates titles to 40 chars with '...' suffix in all table
outputs (list, search, digest, stats). Prevents long titles from
breaking table formatting. JSON output retains full titles.

7 new tests for truncation behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant