activeContextSize returns the context window the packer should aim at: the live server-reported value for the active profile if known, else the on-disk ContextSize, else defaultPackFallback, so cloud profiles before their first response (and any missing/zero value) still get a sensible budget.
()
| 315 | |
| 316 | func New(cfg *config.Config, cli *llm.Client, projectDir, version string) Model { |
| 317 | ta := newPromptInput() |
| 318 | |
| 319 | // Fixed dark style: WithAutoStyle queries the terminal (OSC 11) before |
| 320 | // bubbletea grabs raw stdin, so the reply bytes leak into the textarea as |
| 321 | // "1;rgb:1e1e/1e1e/1e1e" garbage. Dev containers are dark: no query, no leak. |
| 322 | r, _ := glamour.NewTermRenderer(glamour.WithStandardStyle("dark"), glamour.WithWordWrap(defaultWidth-4)) |
| 323 | |
| 324 | sp := spinner.New() |
| 325 | sp.Spinner = spinner.MiniDot |
| 326 | sp.Style = styleSpinner |
| 327 | |
| 328 | m := Model{ |