Skip to content

feat(git): mark reported queries and fold their output in the console - #16

Merged
xiaoyumuxi merged 1 commit into
mainfrom
feat/console-query-fold
Nov 11, 2026
Merged

xiaoyumuxi merged 1 commit into
mainfrom
feat/console-query-fold

Conversation

@xiaoyumuxi

Copy link
Copy Markdown
Contributor

Summary

Lithe Desktop records every Git command a user-facing request runs, internal read-only queries included (gitExecution.reportQueries). A single log refresh writes hundreds of git log / git show output lines into the console, burying the commands the user actually ran.

  • started events gain query: true for an internal query reported through reportQueries, false for a visible command (Invocation::reported).
  • Console records accept query (default false). git.consolePresentation folds a successful query's whole output into one query output fragment whose count labels it, like IDEA's silent handlers. A failed query, and a query that wrote a single line, keep their output visible.
  • Search still counts and locates every folded line, so a host can open the fold on a hit.
  • rust-core-api.md and execution-events-v1.json describe the new field.

Tests

  • cargo test -p lithe-core --lib -- git::console git::execution_events git::execution_policy (22 passed), including the new query_output_folds_whole_unless_the_query_failed_or_wrote_one_line and reported_queries_are_marked_apart_from_visible_commands.

Started events carry query: true for an internal query reported through
reportQueries and false for a visible command. A console record passes the
flag back, and git.consolePresentation folds a successful query's whole output
into one query fragment labelled by its line count, the way IDEA keeps silent
handlers out of sight. Failed queries and single-line output stay visible;
search still locates every folded line.
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