Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/msgfmt/message_box.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ func removeCodexInputBox(msg string) string {

func removeOpencodeMessageBox(msg string) string {
lines := strings.Split(msg, "\n")
// Check the last 3 lines for
//
// ┃ ┃
// ┃ > ┃
// ┃ ┃
// We only check for the first ┃ and then an empty line above it - as sometimes the full input block does not load within a snapshot,
// this leads to displaying a bunch of newlines.
for i := len(lines) - 1; i >= 2; i-- {
if strings.ReplaceAll(lines[i-2], " ", "") != "┃┃" &&
strings.ReplaceAll(lines[i], " ", "") == "┃┃" {
lines = lines[:i-1]
// ┃
// ┃
// ┃
// ┃ Build Anthropic Claude Sonnet 4
// ╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
// tab switch agent ctrl+p commands
//
for i := len(lines) - 1; i >= 4; i-- {
if strings.HasPrefix(strings.TrimSpace(lines[i]), "╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀") {
lines = lines[:i-4]
break
}
}
Expand Down
20 changes: 9 additions & 11 deletions lib/msgfmt/testdata/format/opencode/first_message/expected.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀
v0.6.8
█▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
█░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀
▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀
1.0.98

/new new session ctrl+x n
/help show help ctrl+x h
/share share session ctrl+x s
/models list models ctrl+x m


Grok Code is free for a limited time
Commands ctrl+p
List sessions ctrl+x l
Switch model ctrl+x m
Switch agent tab
623 changes: 22 additions & 601 deletions lib/msgfmt/testdata/format/opencode/first_message/msg.txt

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions lib/msgfmt/testdata/format/opencode/partial_render/expected.txt

This file was deleted.

604 changes: 0 additions & 604 deletions lib/msgfmt/testdata/format/opencode/partial_render/msg.txt

This file was deleted.

Empty file.
29 changes: 15 additions & 14 deletions lib/msgfmt/testdata/format/opencode/second_message/expected.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
┃ Shell Check git remote URLs to identify repository
┃ $ git remote -v
┃ origin https://github.com/35C4n0r/agentapi (fetch)
┃ origin https://github.com/35C4n0r/agentapi (push)
┃ upstream https://github.com/coder/agentapi.git (fetch)
┃ upstream https://github.com/coder/agentapi.git (push)


This is the 35C4n0r/agentapi repository, which is a fork of
coder/agentapi.
Build claude-sonnet-4-20250514 (09:19 PM)
This is the agentapi repository. Based on the codebase structure and documentation, it's a Go HTTP API server that controls various coding agents (like Claude Code, Aider, Goose, etc.) through
terminal emulation.

The main purpose of this repository is to:

- Run coding agents in an in-memory terminal emulator
- Provide a unified HTTP API to interact with different agent types
- Parse terminal output into structured messages
- Include a Next.js web chat UI for interacting with agents
- Support multiple agent types with different message formats

The project supports agents like Claude Code, Aider, Goose, Codex, Gemini, and others, providing a standardized interface to communicate with them through HTTP endpoints and a web-based chat
interface.

Build claude-sonnet-4-20250514
Loading