Uh oh!
There was an error while loading. Please reload this page.
feat: add /uptime slash command - #24161
Conversation
b58f687 to
9284b88Comparerektide
commented
Apr 27, 2026
I'd love to also show how long we are idle for, as well |
mateuszkwiatkowski
commented
Apr 28, 2026
9284b88 to
4ec5557Compare4ec5557 to
ce267c1CompareAutomated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#24160
Type of change
What does this PR do?
Adds a
/uptimeslash command that shows how long the OpenCode process has been running, similar to the UNIXuptimecommand. It opens a centered dialog (same style as/status) displaying:11:23 AM up 3h 1m 45sidle 5m 12sworkinginsteadChanges:
opencode-process.ts: recordsDate.now()at module load as the process start time/global/healthendpoint: now includesstartTimein the responsedialog-uptime.tsx: new dialog component matching the/statusdialog layout, with idle time tracking via route and sync contextapp.tsx: registers the/uptimeslash command under the System categorystartTimefieldHow did you verify your code works?
/uptimein the TUI from both session and home viewsworkingstate shown during active streamingbun typecheckpasses (all 13 packages via turbo pre-push hook)./packages/sdk/js/script/build.tsoxlint) reports no new warningsScreenshots / recordings
N/A -- no structural UI change beyond a new dialog following the existing
/statuspattern.Checklist