wip: refactoring tui
This commit is contained in:
parent
37c0c1f358
commit
005d6e0bde
30 changed files with 172 additions and 4678 deletions
|
|
@ -4,8 +4,6 @@ import (
|
|||
"encoding/base64"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/sst/opencode/internal/llm/models"
|
||||
)
|
||||
|
||||
type MessageRole string
|
||||
|
|
@ -74,11 +72,11 @@ type BinaryContent struct {
|
|||
Data []byte
|
||||
}
|
||||
|
||||
func (bc BinaryContent) String(provider models.ModelProvider) string {
|
||||
func (bc BinaryContent) String(provider string) string {
|
||||
base64Encoded := base64.StdEncoding.EncodeToString(bc.Data)
|
||||
if provider == models.ProviderOpenAI {
|
||||
return "data:" + bc.MIMEType + ";base64," + base64Encoded
|
||||
}
|
||||
// if provider == models.ProviderOpenAI {
|
||||
// return "data:" + bc.MIMEType + ";base64," + base64Encoded
|
||||
// }
|
||||
return base64Encoded
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue