feat(tui): workflow-start intent input box wired to StartSession.input

This commit is contained in:
2026-06-04 02:24:41 +04:00
parent fe561ada09
commit 638f57709d
5 changed files with 82 additions and 13 deletions
+8 -3
View File
@@ -213,9 +213,14 @@ func ChatInput(sessionID, text, mode string) []byte {
return encode("ChatInput", map[string]any{"sessionId": sessionID, "text": text, "mode": mode})
}
// StartSession launches a workflow-backed session.
func StartSession(workflowID string) []byte {
return encode("StartSession", map[string]any{"workflowId": workflowID, "config": nil})
// StartSession launches a workflow-backed session. input is the optional freeform request
// seeded into the decision journal; pass "" for fixed-task workflows (e.g. healthcheck).
func StartSession(workflowID, input string) []byte {
msg := map[string]any{"workflowId": workflowID, "config": nil}
if input != "" {
msg["input"] = input
}
return encode("StartSession", msg)
}
// CancelSession cancels a running session.