fix(chat): recover web approvals and questions across clients and reconnects

This commit is contained in:
2026-10-20 17:23:07 +01:00
parent ed0abb976d
commit c78def70dd
16 changed files with 420 additions and 54 deletions
+13
View File
@@ -172,6 +172,19 @@ func (m *chatManager) PromptWithMessageIDFiles(ctx context.Context, sessionID, t
}
var errChatAttachmentsUnsupported = errors.New("this chat harness does not support attachments")
var errChatFormReadbackUnsupported = errors.New("this chat harness does not support pending question readback")
func (m *chatManager) Forms(ctx context.Context, sessionID string) ([]protocol.ChatForm, error) {
adapter, err := m.brokerFor(ctx, sessionID)
if err != nil {
return nil, err
}
if reader, ok := adapter.(chatFormReader); ok {
return reader.Forms(ctx, sessionID)
}
return nil, errChatFormReadbackUnsupported
}
var errChatInstructionsUnsupported = errors.New("this chat harness does not support session instructions")
func (m *chatManager) CheckAttachments(ctx context.Context, sessionID string) error {