@youtyan/code-viewer 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,12 +8,33 @@ Requires Node.js 20 or newer. Development uses
8
8
  ## Features
9
9
 
10
10
  - Browse repository files and folders in a persistent sidebar with live
11
- worktree change updates over SSE.
11
+ worktree change updates over SSE. The sidebar filter takes plain text
12
+ (substring), `/pattern/` (regex), `~text` (fuzzy, same matcher as the file
13
+ palette) and globs such as `*.ts` or `src/**`, and shows
14
+ `matching / all` file counts in the header while it is active.
12
15
  - View git diffs with unified or split layout, lazy loading, viewed-file
13
16
  state, ignore-whitespace and hide-tests toggles, and dismissible per-line
14
17
  "reference pills" that copy `@path#start-end` for AI agents.
15
18
  - Browse commit history per branch and open any commit's changed files and
16
- diff, with shareable `/history?ref=<branch>&commit=<sha>` links.
19
+ diff, with shareable `/history?ref=<branch>&commit=<sha>` links. The
20
+ filter understands message words (`"quoted"` keeps spaces), sha prefixes,
21
+ `author:<name>`, `path:<part>`, `since:`/`after:`/`until:`/`before:<date>`,
22
+ `code:<text>` (lines added or removed, `git log -S`) and `merges:no` /
23
+ `merges:only`; kinds combine with AND, `author:` offers the repository's
24
+ authors as suggestions, and the text rides in the URL (`?q=`). Rows carry
25
+ branch / tag labels and a merge marker. The selected commit has a copy-sha
26
+ button and an "Open on GitHub" link; Shift+click a second commit to diff the
27
+ whole range between them (`?compare=<sha>`), and a merge commit lets you
28
+ pick the parent to compare against. `↑` / `↓` step commits anywhere on the
29
+ screen, `j` / `k` do when the commit list has focus, `g h` opens the
30
+ history of the ref you are viewing, and every folder page has a History
31
+ button that opens the log restricted to that folder
32
+ (`/history?path=<dir>/`). Select lines in a file and the line-reference
33
+ pill offers **Line history**: the History tab restricted to commits that
34
+ changed those lines (`git log -L`, `?lines=<start>-<end>`). File pages
35
+ carry older / newer revision buttons that step through the commits that
36
+ touched that file, and the ref picker remembers the refs you picked last
37
+ as quick chips.
17
38
  - Open per-file Blame and History tabs on a file detail page (GitHub-style):
18
39
  Blame groups consecutive lines from the same commit with an Older→Newer
19
40
  colour bar and lets you jump to the originating commit; History embeds the
@@ -42,7 +63,24 @@ Requires Node.js 20 or newer. Development uses
42
63
  - Preview browser-safe media and show metadata for binary files that cannot
43
64
  be rendered.
44
65
  - Find files and grep across the repository with `Ctrl+K` (file palette) and
45
- `Ctrl+G` (text palette).
66
+ `Ctrl+G` (text palette), or from the search button at the left of the
67
+ header icons (plain click: files, Shift+click: grep). The two palettes
68
+ share one window: `Ctrl+K` /
69
+ `Ctrl+G` (or the Files / Grep buttons in its label row) switch modes while
70
+ keeping what you typed, and reopening a palette restores its last query,
71
+ selected so typing replaces it. With an empty query the file palette lists
72
+ the files you opened most recently, and its result count says when the
73
+ ranking was cut at 50 (`50 of 1,234 results`). The text palette has
74
+ match-case (`Alt+C`) and whole-word (`Alt+W`) toggles next to the regex
75
+ one, and `path:<dir or glob>` tokens in the query narrow the search
76
+ (`path:src/ path:*.md needle`); matching is case-insensitive on every
77
+ engine unless you turn match-case on. Opening a hit marks the matched
78
+ text on the target line (`?hl=`), and in large virtualized files it
79
+ pre-fills the in-file find bar with it. **Pin** (or `Ctrl+Enter`) moves
80
+ the query into the bottom panel's **Search** tab, where the grouped
81
+ result list stays open while you browse files; the query rides in the
82
+ URL (`?results=<query>`) so a reload re-runs it, and the Search tab can
83
+ also be opened directly from the panel's tab row.
46
84
  - Switch the viewer UI between English and Japanese from Settings & Help —
47
85
  the language toggle live-updates every screen including the datastore
48
86
  viewer.
@@ -454,9 +492,17 @@ Open Datastores in the global navigation to access:
454
492
  row-count changes. Double-click a cell to edit inline when Edit mode is on;
455
493
  the whole pending edit batch commits atomically.
456
494
  - **Detail footer and related panel** — click any cell to open a resizable
457
- detail footer; foreign-key cells open a related panel showing the
495
+ detail footer, where JSON values are pretty-printed and syntax-highlighted;
496
+ foreign-key cells open a related panel showing the
458
497
  referenced or referencing rows, with multi-step drill-down breadcrumbs.
459
- Cells that match the focused row are highlighted in both panels.
498
+ Cells that match the focused row are highlighted in both panels. Once the
499
+ grid has focus, arrow keys move the active cell from data cell to data cell
500
+ and the detail footer follows it, `Enter` follows a foreign key (arrow keys
501
+ alone never fire a related-table query), `Escape` closes whichever panel is
502
+ open, and `Tab` / `Shift+Tab` move between the main grid and the related
503
+ grid. The related panel's reference list keeps each entry on one line with
504
+ the full table name and condition in a tooltip, and its width can be dragged
505
+ and is remembered.
460
506
  - **Footer dock with Query History & Session log** — JetBrains-style bottom
461
507
  dock that hosts two tabs: the per-database **Query History** (master/detail
462
508
  list of saved queries, SSE-synced across tabs) and a **Session log** that
@@ -761,13 +807,21 @@ code-viewer search code --term "TODO" --json
761
807
  # extended-regex search, restricted to two subtrees, on the `main` ref.
762
808
  code-viewer search code --term "fn handler" --regex \
763
809
  --path src --path tests --ref main --json
810
+
811
+ # exact case and whole words only; --path also accepts globs.
812
+ code-viewer search code --term "Token" --case-sensitive --word \
813
+ --path "src/**/*.ts" --json
764
814
  ```
765
815
 
766
816
  Default text output is `path:line:column<TAB>preview`, one line per
767
817
  match. An empty result prints `no matches` to stderr and exits 0.
768
818
  Parse errors and unreachable servers exit 1. `--max` accepts a positive
769
819
  integer up to the server's hard cap; `truncated=true` in the JSON
770
- response means more matches exist beyond the cap. Run
820
+ response means more matches exist beyond the cap. Matching is
821
+ case-insensitive on every engine unless `--case-sensitive` is given;
822
+ `--word` keeps only hits on word boundaries (`rg -w` / `git grep -w`, and
823
+ the same rule in the fallback scanner). `--path` takes a file, a
824
+ directory, or a glob such as `src/**/*.ts`. Run
771
825
  `code-viewer search agent-help` for the full AI-agent guide.
772
826
 
773
827
  `code-viewer search files` is the sister command for **filename**