Add os.showAlert() function to display information dialogs #695
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.
Closes #62008316-1f4f-42d5-9793-0928f77ed09a
Overview
Adds a new
os.showAlert()
function that displays an information/alert dialog with a single dismiss button. This complements the existingos.showConfirm()
function and provides a simple way to communicate important information to users that needs to be manually dismissed.Changes
Core Implementation
ShowAlertAction
andShowAlertOptions
types inBotEvents.ts
with proper JSDoc documentationos.showAlert(options)
function inAuxLibrary.ts
that returns aPromise<void>
which resolves when the user dismisses the alertShowAlertModal
Vue component with TypeScript, template, and CSS files that handles the alert dialog displayAPI
Usage Examples
Testing
AuxLibrary.spec.ts
Documentation
@dochash
,@docid
, and@docname
tags for automatic documentation generationThe implementation follows the same architectural pattern as
os.showConfirm()
, ensuring consistency with the existing codebase.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint.prisma.io
/opt/hostedtoolcache/node/20.19.5/x64/bin/node /home/REDACTED/work/casualos/casualos/node_modules/.pnpm/[email protected][email protected]/node_modules/prisma/build/child {"product":"prisma","version":"6.14.0","cli_install_type":"local","information":"","local_timestamp":"2025-10-03T17:48:21Z","project_hash":"a33db9b0","cli_path":"/home/REDACTED/work/casualos/casualos/src/aux-server/node_modules/prisma/build/index.js","cli_path_hash":"3b63eda1","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["cockroachdb"],"schema_preview_features":["tracing"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-3b63eda1","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/casualos/casualos/node_modules/.pnpm/[email protected][email protected]/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":false}
(dns block)/opt/hostedtoolcache/node/20.19.5/x64/bin/node /home/REDACTED/work/casualos/casualos/node_modules/.pnpm/[email protected][email protected]/node_modules/prisma/build/child {"product":"prisma","version":"6.14.0","cli_install_type":"local","information":"","local_timestamp":"2025-10-03T17:48:24Z","project_hash":"5ca80110","cli_path":"/home/REDACTED/work/casualos/casualos/src/aux-server/node_modules/prisma/build/index.js","cli_path_hash":"3b63eda1","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"--config [redacted] generate","schema_providers":["sqlite"],"schema_preview_features":["tracing"],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-3b63eda1","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/casualos/casualos/node_modules/.pnpm/[email protected][email protected]/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":false}
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.