Skip to content

Commit f497a4c

Browse files
committed
Fix Hawk CI lint and ACP test
1 parent 3239182 commit f497a4c

16 files changed

Lines changed: 15 additions & 103 deletions

cmd/braille_spinner.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ var hawkSpinnerGlyphs = []string{"◐", "◓", "◑", "◒"}
3030
// hawkQuadBlockGlyphs is the legacy QUADBLOCK animation (kept for tests / bubbles compat).
3131
var hawkQuadBlockGlyphs = []string{"▛", "▜", "▟", "▙"}
3232

33-
// hawkSpinnerBG is the chat viewport background (chat_view.go).
34-
var hawkSpinnerBG = [3]int{30, 30, 40}
35-
3633
// spinnerFrames maps style names to their animation frames.
3734
var spinnerFrames = map[SpinnerStyle][]string{
3835
SpinnerBraille: {"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"},

cmd/chat_focus.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ func (m chatModel) scrollPositionLabel() string {
8383
return fmt.Sprintf("%d-%d/%d", top, bottom, m.contentLines)
8484
}
8585

86-
func (m chatModel) uiFocusLabel() string {
87-
if m.inScrollbackFocus() {
88-
return "scrollback"
89-
}
90-
return "prompt"
91-
}
92-
9386
func formatSessionContextUsage(m *chatModel) string {
9487
if m == nil || m.session == nil {
9588
return "No active session."
@@ -136,6 +129,6 @@ func (m chatModel) renderScrollbackFocusBar(width int) string {
136129
if width < len(hint)+4 {
137130
width = len(hint) + 4
138131
}
139-
style := lipgloss.NewStyle().Foreground(infoSky).Bold(true).Inline(true)
132+
style := lipgloss.NewStyle().Foreground(infoSky).Bold(true).Inline(true).Width(width)
140133
return style.Render(" " + hint)
141134
}

cmd/chat_model.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ var (
4747
containerErrStyle = lipgloss.NewStyle().Foreground(errorCoral)
4848
containerLabelStyle = lipgloss.NewStyle().Foreground(containerBlue)
4949

50-
// Backwards-compatible aliases for callers that still use the old
51-
// names. New code should use the purpose-named constants in theme.go.
52-
tealColor = successTeal
53-
dimColor = textDisabled
54-
errorColor = errorCoral
55-
toolColor = toolGold
50+
// Backwards-compatible alias for callers that still use the old name.
51+
// New code should use the purpose-named constants in theme.go.
52+
dimColor = textDisabled
5653
)
5754

5855
// hawkSpinnerFrames feeds the bubbles spinner (matches BrailleSpinner default).
@@ -205,7 +202,6 @@ type chatModel struct {
205202
uiFocus uiFocusArea
206203
contentLines int // total lines in scrollback content (for footer position)
207204
vim *VimState
208-
contextViz *ContextVisualization
209205
wal *session.WAL
210206
startedAt time.Time // per-turn timer (spinner + turn elapsed)
211207
sessionStartedAt time.Time // whole chat session (footer duration)

cmd/chat_status.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,6 @@ func formatContextUsedLabel(tokens int) string {
339339
return formatModelTableContext(tokens)
340340
}
341341

342-
func contextUsageStyle(pct int) lipgloss.Style {
343-
switch {
344-
case pct >= 95:
345-
return lipgloss.NewStyle().Foreground(errorCoral).Inline(true)
346-
case pct >= 80:
347-
return lipgloss.NewStyle().Foreground(warnAmber).Inline(true)
348-
default:
349-
return configMutedStyle().Inline(true)
350-
}
351-
}
352-
353342
// chatBottomRightStatus is the deployment line on the input bar.
354343
func (m *chatModel) chatBottomRightStatus() string {
355344
return m.chatConnectionStatus()

cmd/chat_view.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ func renderSetupCompleteMessage(model string) string {
4646
)
4747
}
4848

49-
// welcomeHeader returns the welcome text for /config overlay only (main TUI uses a fixed pane).
50-
func (m chatModel) welcomeHeader() string {
51-
if !m.showWelcomeBanner() {
52-
return ""
53-
}
54-
return m.welcomeCache + "\n\n"
55-
}
56-
5749
// sanitizeIdentity replaces model self-identifications with "hawk" / "GrayCode AI".
5850
var (
5951
reModelName = regexp.MustCompile(`(?i)\b(I['` + "\u2018\u2019" + `]m|I am|my name is)\s+\*{0,2}(ChatGPT|GPT-?\d*[o]?|Claude|Gemini|Gemma|Kimi|DeepSeek|Llama|Qwen|Mistral|Mixtral|Grok|Copilot|Bard|Command R|Yi|Phi|Nova|Titan|BLOOM|Falcon|PaLM|LaMDA|Chinchilla|Vicuna|Alpaca|WizardLM|Orca|Nemotron|Granite|DBRX|OLMo|Pixtral|Ernie|PanGu|Sarvam|MiMo|GLM|Codex|Jurassic|Cohere|Jais|Step|Velvet|Alice|Apertus|Param|YandexGPT|MiniMax)\*{0,2}`)

cmd/compact_ui.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,12 @@ func runManualCompactCmd(ctx context.Context, sess *engine.Session) tea.Cmd {
231231
return compactDoneMsg{err: fmt.Errorf("no session")}
232232
}
233233
before := sess.MessageCount()
234-
strat, tokBefore, tokAfter, err := sess.CompactConversation(ctx)
234+
compactStrategy, tokBefore, tokAfter, err := sess.CompactConversation(ctx)
235235
if errors.Is(ctx.Err(), context.DeadlineExceeded) && err == nil {
236236
err = ctx.Err()
237237
}
238238
return compactDoneMsg{
239-
strategy: strat,
239+
strategy: compactStrategy,
240240
tokensBefore: tokBefore,
241241
tokensAfter: tokAfter,
242242
err: err,

cmd/config_table.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,6 @@ func renderConfigTableRow(values []string, cursor, active, markEnd bool, layout
106106
return prefix + renderConfigTableLine(cols, layout, styles)
107107
}
108108

109-
func renderConfigTableActionRow(label string, cursor bool, rowStyle, cursorStyle lipgloss.Style) string {
110-
prefix := strings.Repeat(" ", configTableIndent)
111-
if cursor {
112-
prefix = strings.Repeat(" ", configTableIndent-2) + cursorStyle.Render(iconPrompt) + " "
113-
return prefix + cursorStyle.Render(label)
114-
}
115-
return rowStyle.Render(prefix + label)
116-
}
117-
118109
func renderConfigTableLine(values []string, layout configTableLayout, styles []lipgloss.Style) string {
119110
parts := make([]string, len(values))
120111
for i, v := range values {

cmd/statusbar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func renderContainerFooterDetail(detail string, sess *engine.Session) string {
169169
if !found {
170170
return statusStyle.Render(detail)
171171
}
172-
level := DefaultContainerAutonomy
172+
var level engine.AutonomyLevel
173173
if sess != nil && sess.Autonomy != 0 {
174174
level = sess.Autonomy
175175
} else {

cmd/theme.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ const (
189189
// message in the viewport.
190190
iconAssistantPrefix = "⛬"
191191

192-
// Tool result / error bullet (used in the non-TUI exit dump).
193-
iconToolBullet = "●"
194-
195192
// Typing indicator dots — one filled, two empty. See braille_spinner.go.
196193
iconDotFilled = "▪"
197194
iconDotEmpty = "▫"
@@ -202,15 +199,6 @@ const (
202199
// Warning / permission prompt prefix.
203200
iconWarn = "⚠"
204201

205-
// Tool / skill activation indicator.
206-
iconTool = "⚡"
207-
208-
// Markdown bullet.
209-
iconBullet = "•"
210-
211-
// Star (used in config tabs to mark "highlighted" rows).
212-
iconStar = "★"
213-
214202
// quitFooterHint — exit hint in splash/footer chrome (work TUI uses double Ctrl+C).
215203
quitFooterHint = "ctrl+c · quit"
216204

cmd/welcome_banner.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ const welcomeToBannerMinWidth = 61
5050
// welcomeToPhraseMinWidth is the visible width for the combined "WELCOME TO" block.
5151
var welcomeToPhraseMinWidth = blockLinesWidth(welcomeToPhraseLines)
5252

53-
// welcomeGateBannerWidth returns the widest row across WELCOME + TO blocks.
54-
func welcomeGateBannerWidth() int {
55-
w := welcomeToPhraseMinWidth
56-
for _, line := range welcomeToWordLines {
57-
if n := runewidth.StringWidth(line); n > w {
58-
w = n
59-
}
60-
}
61-
return w
62-
}
63-
6453
func composeHawkBlockLines(text string) []string {
6554
rows := make([]string, 5)
6655
words := strings.Fields(text)

0 commit comments

Comments
 (0)