Widget: copy a completed assistant reply

Geschlossen
#477 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@piyusshhjangid arbeitet bereits daran.

Seit 30.10.2026.

  • #504 von @piyusshhjangid — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

hacktoberfest
What problem would this solve?

Visitors often need to reuse an answer outside the chat. Selecting a long rendered reply is awkward on phones and can be error-prone around formatted text and code blocks.

What would you like to happen?

Add a copy action to completed assistant replies. Copy the reply as readable plain text, preserving code block contents and line breaks without copying Markdown syntax. Keep the action out of the streaming state, make it keyboard accessible, and announce success or failure without disrupting the existing reply announcement.

Where to look
  • packages/widget/src/dom/messages.ts renders assistant messages and reply actions.
  • packages/widget/src/i18n.ts holds the widget’s accessible UI strings.
  • packages/widget/src/styles/widget.css contains message action styles.
  • packages/widget/tests/dom/messages.test.ts covers message rendering.
Acceptance criteria
  • A copy button is available for a completed assistant reply and is not shown while that reply is streaming.
  • Clipboard failures are handled without an uncaught error, including when the Clipboard API is unavailable.
  • The control has a localized accessible name, a visible focus indicator, and an accessible confirmation of the result.
  • Tests cover copying formatted content, streaming replies, and clipboard failure.
  • Add a widget changeset; keep the gzipped bundle within the configured size budget.
Contributing
  • I’d like to work on this myself
Vorherrschende Sprache
TypeScript
Sterne
13
Forks
7
Ø Merge
3 Std. 10 Min.
Gemergte PRs (30 T.)
339

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codercops/chatcops

Alle Issues in codercops/chatcops

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.