feat: search sessions, attach files, read aloud, jump to latest
Reach the first-party mobile client's everyday features: - sessions: a search button opens a field; typing asks the server with its search parameter (350 ms settle) and clearing restores the list - composer: attach photos or files (up to five, 10 MB each) as data URLs with the prompt; attachments show as removable chips and are named under the sent message - turn menu: read the answer aloud with the system voice, or stop it - chat: a "latest" button appears after scrolling up and returns to the end of the conversation - reset a live search when a connection ends Bump version to 0.2.0 (build 14).
This commit is contained in:
1 parent
4c6fcf4cbe
commit
72119b73e8
11 files changed
+445
-56
No files matched your search
@@ -157,12 +157,23 @@ func TestMessagesAndTurn(t *testing.T) {
|
||||
if len(page.Data) != 1 || page.Data[0].Content[0].Text != "hello" {
|
||||
t.Fatalf("unexpected messages: %+v", page)
|
||||
}
|
||||
if err := c.Prompt(context.Background(), "ses_1", PromptOptions{Text: "ping", MessageID: "msg_9"}); err != nil {
|
||||
if err := c.Prompt(context.Background(), "ses_1", PromptOptions{
|
||||
Text: "ping", MessageID: "msg_9",
|
||||
Files: []PromptFile{{URI: "data:text/plain;base64,aGk=", Name: "note.txt"}},
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if promptBody["text"] != "ping" || promptBody["id"] != "msg_9" {
|
||||
t.Errorf("prompt body: %v", promptBody)
|
||||
}
|
||||
files, _ := promptBody["files"].([]any)
|
||||
if len(files) != 1 {
|
||||
t.Fatalf("prompt files: %v", promptBody["files"])
|
||||
}
|
||||
file, _ := files[0].(map[string]any)
|
||||
if file["name"] != "note.txt" || file["uri"] != "data:text/plain;base64,aGk=" {
|
||||
t.Errorf("prompt file: %v", file)
|
||||
}
|
||||
ok, err := c.Interrupt(context.Background(), "ses_1", "")
|
||||
if err != nil || !ok {
|
||||
t.Fatalf("interrupt: %v %v", ok, err)
|
||||
|
||||
Reference in new issue
Block a user