Add Ask AI button for error log analysis#511
Open
whallysson wants to merge 1 commit intoopcodesio:mainfrom
Open
Add Ask AI button for error log analysis#511whallysson wants to merge 1 commit intoopcodesio:mainfrom
whallysson wants to merge 1 commit intoopcodesio:mainfrom
Conversation
Add a client-side "Ask AI" button to log entries with danger/warning levels. Users can copy a pre-formatted markdown prompt to clipboard or open the error directly in ChatGPT for AI-assisted debugging. - Zero backend changes: all formatting and sanitization happens client-side - Sanitizes sensitive data (JWT, passwords, API keys, credit cards) before export - Truncates content for ChatGPT URL to stay within browser URL limits (~2000 chars) - Follows existing LogCopyButton patterns for consistency
Author
|
Hi @arukompas, this is a lightweight, fully client-side addition — no backend changes, no new dependencies. Would love your feedback on the approach. |
|
Just went here propose exactly this feature. 👍 Would love to see this soon. |
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.
Summary
Adds a client-side "Ask AI" button to log entries with
dangerorwarningseverity levels, allowing users to quickly export error context to AI assistants for debugging help.This is a complete rewrite of #469, taking a fundamentally different approach: zero backend, zero config, zero new dependencies. The entire feature runs client-side in a single Vue component (~160 lines).
Changes
New file:
AskAiButton.vue— Self-contained component with two actions:navigator.clipboardwith fallback to existingcopyToClipboardhelperchatgpt.com/?q=with a truncated version of the prompt (capped at ~1800 chars to stay under browser URL length limits)Modified:
BaseLogTable.vue(+7 lines) — ImportsAskAiButtonand renders it conditionally fordanger/warninglog levels, in both desktop and mobile layoutsSensitive data sanitization
Before export, the component redacts:
Bearer eyJ...)key=valuepatterns)1234-5678-9012-3456)123.456.789-00)password,api_key,access_token,cvv, etc.)Design decisions
LogCopyButton.vuefor consistency (same prop interface, similar UX feedback)?q=URL parameter support in Oct 2025Test Results
All existing tests pass:
Related
Supersedes #469 (can be closed after merge).