web: create a chat through the directory picker (C2)

This commit is contained in:
2026-10-19 14:25:42 +01:00
parent 2fe63012f9
commit a7872c3f31
9 changed files with 841 additions and 36 deletions
+7
View File
@@ -64,6 +64,10 @@ export const Protocol = Object.freeze({
CHAT_PROMPT: "chat_prompt",
CHAT_INTERRUPT: "chat_interrupt",
CHAT_CREATE: "chat_create",
// The create flow's directory choices (C2): `chat_directories` has no body and
// replies in the `chat_directories` field, home first then recent operator
// directories (internal/protocol/chat.go ChatDirectories).
CHAT_DIRECTORIES: "chat_directories",
// The approval card (C10): the server pushes `chat_permission` frames (one
// pending request, later re-pushed with the resolution) and the phone answers
// with `chat_reply` (internal/protocol/chat.go ChatPermission/ChatReply).
@@ -102,6 +106,9 @@ export const ChatKeys = Object.freeze({
// separate field name here would put it on the wrong part of the envelope.
PROMPT: "chat_prompt",
CREATE: "chat_create",
// The `chat_directories` reply (C2), home first then recents; mirrors
// internal/protocol/message.go `ChatDirectories []string`.
DIRECTORIES: "chat_directories",
QUEUED: "chat_queued",
// C10: the pushed approval frame (`chat_permission`) and the answer body
// (`chat_reply`), both distinct Message fields in internal/protocol/message.go.