feat: add idle app status (#18415)

"Idle" is more accurate than "complete" since:

1. AgentAPI only knows if the screen is active; it has no way of knowing
    if the task is complete.
2. The LLM might be done with its current prompt, but that does not mean
    the task is complete either (it likely needs refinement).

The "complete" state will be reserved for future definition.

Additionally, in the case where the screen goes idle but the LLM never
reported a status update, we can get an idle icon without a message, and
it looks kinda janky in the UI so if there is no message I display the
state text.

Closes https://github.com/coder/internal/issues/699
This commit is contained in:
Asher
2025-06-20 14:34:31 -08:00
committed by GitHub
parent 0258f1d771
commit 0a483ea2b7
20 changed files with 115 additions and 16 deletions

2
coderd/apidoc/docs.go generated
View File

@ -18081,11 +18081,13 @@ const docTemplate = `{
"type": "string",
"enum": [
"working",
"idle",
"complete",
"failure"
],
"x-enum-varnames": [
"WorkspaceAppStatusStateWorking",
"WorkspaceAppStatusStateIdle",
"WorkspaceAppStatusStateComplete",
"WorkspaceAppStatusStateFailure"
]