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
1 change: 1 addition & 0 deletions chat/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/httpapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ func (s *Server) StartSnapshotLoop(ctx context.Context) {

// Send initial prompt when agent becomes stable for the first time
if !s.conversation.InitialPromptSent && convertStatus(currentStatus) == AgentStatusStable {

if err := s.conversation.SendMessage(FormatMessage(s.agentType, s.conversation.InitialPrompt)...); err != nil {
s.logger.Error("Failed to send initial prompt", "error", err)
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/msgfmt/message_box.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func removeOpencodeMessageBox(msg string) string {
// ┃ ┃
// 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 >= 1; i-- {
if strings.TrimSpace(lines[i-1]) == "" &&
for i := len(lines) - 1; i >= 2; i-- {
if strings.ReplaceAll(lines[i-2], " ", "") != "┃┃" &&
strings.ReplaceAll(lines[i], " ", "") == "┃┃" {
lines = lines[:i-1]
break
Expand Down
12 changes: 12 additions & 0 deletions lib/msgfmt/testdata/format/opencode/partial_render/expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀
v0.6.8

/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
Loading