-
Notifications
You must be signed in to change notification settings - Fork 92
feat: opencode initial prompt hack test #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
✅ Preview binaries are ready! To test with modules: |
johnstcn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a 'hack' as per the PR title? Has your testing turned up any further information?
| 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], " ", "") != "┃┃" && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test that fails without this change please?
| } | ||
|
|
||
| func formatOpencodeMessage(message string, userInput string) string { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if s.agentType == mf.AgentTypeOpencode { | ||
| time.Sleep(5 * time.Second) | ||
| // If we still have it as stable, go ahead. | ||
| if convertStatus(s.conversation.Status()) != AgentStatusStable { | ||
| continue | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this change isn't clear. Can you add some clearer comments as to why we need to wait 5 seconds?
I don't like this.Thinking of a better way to approach Initial prompt, also wondering why it fails on coder (remote) but works on local agentapi, is it because of latency? Will need to test that out with a debug PR.
cc: @matifali @johnstcn