Open a run or pipeline in a new chat
The run and pipeline More menus offer Open in chat: a new chat in the run's (or the pipeline's latest run's) workspace opens on the Chat tab with a draft naming the run or pipeline and how to inspect or change it.
This commit is contained in:
@@ -114,6 +114,7 @@ class ChatThreadView extends StatefulWidget {
|
||||
this.scrollPositions,
|
||||
this.transcripts,
|
||||
this.initialNotice,
|
||||
this.initialDraft,
|
||||
this.onNewSession,
|
||||
this.onSessionRenamed,
|
||||
this.onSessionClosed,
|
||||
@@ -157,6 +158,9 @@ class ChatThreadView extends StatefulWidget {
|
||||
/// the `/new` notice for a session it just created and opened.
|
||||
final String? initialNotice;
|
||||
|
||||
/// A draft supplied by an external deep action; it is never sent.
|
||||
final String? initialDraft;
|
||||
|
||||
/// `/new` moved this chat to a fresh native session; the destination swaps
|
||||
/// the row in place, opens the new id with the notice and refreshes the
|
||||
/// list. Without a destination the notice shows here instead.
|
||||
@@ -528,6 +532,9 @@ class _ChatThreadViewState extends State<ChatThreadView> {
|
||||
onAccepted: (send, queued) =>
|
||||
_controller.promptAccepted(send.operationId, queued: queued),
|
||||
);
|
||||
if (widget.initialDraft != null) {
|
||||
unawaited(composer.setDraft(widget.initialDraft!));
|
||||
}
|
||||
// A message a previous visit sent but never saw accepted comes back as
|
||||
// "Not sent" unless the history read shows the server has it.
|
||||
unawaited(
|
||||
|
||||
Reference in New Issue
Block a user