Skip to content

Add copy and export for the Ask Optiq conversation - #1051

Open
dhingora-amd wants to merge 1 commit into
mainfrom
dhingora/ai-chat-export
Open

dhingora-amd wants to merge 1 commit into
mainfrom
dhingora/ai-chat-export

Conversation

@dhingora-amd

Copy link
Copy Markdown
Contributor

Motivation

The Ask Optiq assistant had no way to get a conversation out of the panel.
This adds Copy and Export so users can save an investigation, share findings,
or paste a transcript elsewhere.

Technical Details

  • Adds Copy and Export icon buttons to the assistant composer, beside
    Clear; both stay disabled until there is a conversation to save.
  • Copy places the transcript on the clipboard (ImGui::SetClipboardText).
  • Export writes it to a Markdown/text file via AppWindow::ShowSaveFileDialog.
  • New BuildTranscriptText() renders the transcript as Markdown (You / Optiq
    turns, notices as blockquotes); charts are noted rather than snapshotted
    since they redraw from live model data.
  • Reuses NotificationManager for success/failure feedback — no new logging
    or file-write helpers introduced.
  • Files: src/view/src/agenticprofiling/rocprofvis_ai_assistant.{h,_render.cpp}.

Adds Copy and Export icon buttons to the assistant composer, beside Clear.
Copy puts the conversation on the clipboard; Export writes it to a
Markdown/text file through the save dialog. Both reuse NotificationManager
for feedback and stay disabled until there is a conversation to save.

The shared BuildTranscriptText() renders the transcript as Markdown (You /
Optiq turns, notices as blockquotes); charts are noted rather than
snapshotted since they redraw from live model data.
@tomk-amd

tomk-amd commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

None of these are blockers, but recording them here...

Issues

  • Medium (UX)rocprofvis_ai_assistant_render.cpp (Export IconButton):
    Export uses ICON_ARROW_IN_BOX, which is already the import icon ("Import from Basic" in rocprofvis_multi_track_table.cpp). Tooltip says export, but the glyph means the opposite. Prefer ICON_DOCUMENT, ICON_ARCHIVE, or ICON_ARROW_FORWARD unless a dedicated export glyph is added.
  • LowExportTranscript() write path:
    After is_open(), success is toasted without checking write/flush. A full disk or later write error still looks like success. Same gap exists in ScriptEditor::WriteFile; worth fixing here if you touch this path.

Nits

  • Copy/export I/O lives in _render.cpp, whose file comment says that file only draws ImGui and that turn/state machinery stays in rocprofvis_ai_assistant.cpp. Functionally fine (assistant.cpp already includes AppWindow); a later split could move these three methods.
  • Native save dialogs append the first filter’s extension when the name has none (AppWindow around the NFD path). Markdown is first, so a “Text” save named notes becomes notes.md. Pre-existing dialog behavior; not introduced here.
  • Header comment says BuildTranscriptText() “renders” the transcript; it serializes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants