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.
Types ¶
type AppConfig ¶
type AppConfig struct {
ReadOnly bool
Documents []review.AttachedDocument
Project string
Topic string
Version string
Session *review.Session
Author string
Split 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
}
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) 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
}
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
- 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
- forms.go
- highlight.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
- keys.go
- killring.go
- lightbox.go
- location.go
- markdown_images.go
- markdown_inline.go
- messages.go
- navigation.go
- open_external.go
- overall.go
- progress.go
- references.go
- resume.go
- styles.go
- thread.go
- whitespace.go