mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
"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
16 lines
749 B
SQL
16 lines
749 B
SQL
-- It is not possible to delete a value from an enum, so we have to recreate it.
|
|
CREATE TYPE old_workspace_app_status_state AS ENUM ('working', 'complete', 'failure');
|
|
|
|
-- Convert the new "idle" state into "complete". This means we lose some
|
|
-- information when downgrading, but this is necessary to swap to the old enum.
|
|
UPDATE workspace_app_statuses SET state = 'complete' WHERE state = 'idle';
|
|
|
|
-- Swap to the old enum.
|
|
ALTER TABLE workspace_app_statuses
|
|
ALTER COLUMN state TYPE old_workspace_app_status_state
|
|
USING (state::text::old_workspace_app_status_state);
|
|
|
|
-- Drop the new enum and rename the old one to the final name.
|
|
DROP TYPE workspace_app_status_state;
|
|
ALTER TYPE old_workspace_app_status_state RENAME TO workspace_app_status_state;
|