Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrandVersion ¶ added in v1.2.0
BrandVersion renders the Critty brand mark followed by the build version, as shown in the Help dialog footer, for a dark or light background.
func HasDarkBackground ¶ added in v1.2.0
HasDarkBackground asks the terminal on in and out for its background color and reports whether it is dark. Unlike the lipgloss query it gives up after timeout, so command output is not delayed by a silent terminal. Both files must be terminals; any failure reports a dark background, the TUI default.
func InteractiveTerminal ¶ added in v1.8.1
func InteractiveTerminal() bool
InteractiveTerminal reports whether the current TERM supports interactive terminal UI and escape-sequence probes. Agent tool runners such as Antigravity allocate a foreground PTY with TERM=dumb to capture output.
Types ¶
type AppConfig ¶
type AppConfig struct {
Context context.Context
ReadOnly bool
Documents []review.AttachedDocument
DocumentSnapshot *review.SnapshotFile
Project string
Branch string
Topic string
Version string
Session *review.Session
// SearchHistory persists search queries for the project; nil keeps them in memory.
SearchHistory *searchhistory.Store
Author string
Split bool
Watch bool
// Staged reads code-review files and diffs from the Git index.
Staged bool
Patch *gitpkg.Patch
Source *gitpkg.ReviewSource
FinishCh chan<- FinishEvent
FocusPath string
FocusLine int
// Answers labels Comment as Confirm answers and selects it by default.
Answers bool
}
AppConfig carries the cross-cutting dependencies of the TUI.
type AppModel ¶
type AppModel struct {
// contains filtered or unexported fields
}
func NewCodeReviewApp ¶
func NewCodeReviewApp(files []gitpkg.FileChange, ref string, cfg AppConfig) AppModel
NewCodeReviewApp creates a multi-file code review TUI.
func (AppModel) CanWatch ¶ added in v1.6.0
CanWatch reports whether at least one review input has a live source.
func (*AppModel) SaveUnsubmittedDraft ¶
SaveUnsubmittedDraft preserves the editor when the program is stopped externally rather than through the modal's own controls.
type FileTab ¶
type FileTab struct {
// contains filtered or unexported fields
}
FileTab holds per-file state for a single tab in the code review TUI.
type FinishEvent ¶
type FinishEvent struct {
Approved bool
Result *review.FormResult
Files []gitpkg.FileChange
}
FinishEvent is emitted on the finish channel when the reviewer finishes a round. The runner turns it into a payload for blocked agent clients.
type ImageCapability ¶ added in v1.1.2
ImageCapability records an actual terminal probe, or why it was skipped.
func CheckTerminalImages ¶ added in v1.1.2
func CheckTerminalImages() (result ImageCapability, err error)
CheckTerminalImages probes only this process's foreground controlling TTY. Terminal traffic goes to /dev/tty, keeping redirected reports free of escapes.
Source Files
¶
- app.go
- background_probe_unix.go
- clipboard.go
- comment_images.go
- comment_view.go
- completion.go
- content.go
- cursor_links.go
- diff_formats.go
- drifted.go
- editor.go
- editor_images.go
- empty.go
- fileselect.go
- filetab.go
- filetree.go
- finish.go
- form_input.go
- formlist.go
- forms.go
- highlight.go
- horizontal_viewport.go
- image_cells_unix.go
- image_links.go
- image_probe.go
- image_probe_tmux.go
- image_probe_unix.go
- image_responses.go
- images.go
- isearch.go
- isearch_markdown.go
- keys.go
- killring.go
- lightbox.go
- line_editor.go
- location.go
- markdown_document.go
- markdown_images.go
- markdown_inline.go
- markdown_selection.go
- markdown_table.go
- messages.go
- modal_layout.go
- navigation.go
- notice.go
- open_external.go
- outline.go
- outline_code.go
- outline_go.go
- outline_rules.go
- outline_rules_extra.go
- overall.go
- path.go
- progress.go
- rank.go
- references.go
- reload.go
- resume.go
- review_undo.go
- source_language.go
- styles.go
- tabbar.go
- table_scroll.go
- text_selection.go
- thread.go
- undo.go
- watch.go
- whitespace.go