feat: add /uptime slash command#24161
Open
mateuszkwiatkowski wants to merge 1 commit intoanomalyco:devfrom
Open
feat: add /uptime slash command#24161mateuszkwiatkowski wants to merge 1 commit intoanomalyco:devfrom
mateuszkwiatkowski wants to merge 1 commit intoanomalyco:devfrom
Conversation
b58f687 to
9284b88
Compare
Contributor
|
I'd love to also show how long we are idle for, as well |
Author
9284b88 to
4ec5557
Compare
4ec5557 to
ce267c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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