Repository navigation
Conversation
|
Ready for review after local verification: CLI typecheck, repository lint, and an isolated CLI/server smoke passed for filtering, limits, child exclusion, and project isolation. The new CI workflows report |
There was a problem hiding this comment.
Looks good. I checked it against a local server with simulated settings: on the base session list --search is rejected; with this PR it filters top-level sessions by title, ignoring case, keeps newest-first order, applies --max-count after filtering, excludes child sessions, and prints [] / nothing when there is no match. Output without the flag is unchanged. tsc -b in packages/cli passes.
Public API: adds the optional --search <string> flag to opencode session list, which passes through to the existing search parameter of session.list. This is backwards compatible, and the server, SDK and client are unchanged.
No blocking concerns. For now, % and _ in the search text act as SQL wildcards; the server-side fix for that is tracked separately (#54453 / #54461).
Issue for this PR
Closes #56843
Design approval requested on the issue; still pending. Implementation prepared with OpenAI Codex assistance.
Type of change
What does this PR do?
Expose the existing server title filter as
session list --search <text>. Preserve project scope, top-level selection, ordering, and limits.How did you verify your code works?
Bun 1.4.4:
bun typecheckinpackages/cliand rootbun run lintpassed (existing unrelated lint warnings remain).Actual CLI against an isolated authenticated server verified case-insensitive title filtering, newest-first order, limits after filtering, no-match table/JSON output, child exclusion, isolation across two Git projects, unchanged unfiltered output, and
--searchhelp. Reproduce withopencode session list --search <title> --format jsonand--max-count 1in a project containing matching and nonmatching sessions.Upstream full CI currently requires maintainer approval before jobs can run; the existing green checks cover PR metadata only.
Screenshots / recordings
CLI flag only; verified through help and command output.
Checklist
Added by the opencode bot (AI-generated).
Related: #54453, #48718, #59004
Public API: adds the --search flag to
opencode session list(backwards compatible)