@aparte/plugin-subagents 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,6 +49,9 @@ declare const ElementBase: typeof HTMLElement;
49
49
  * @attr {string} agent-id - Which sub-agent (`aparte-subagent-start`'s `agentId`).
50
50
  * @attr {boolean} data-empty - Written BY the element while there is nothing to show (an unknown sub-agent, or one not started yet): it then draws nothing. Read-only; style or fold your layout against it.
51
51
  * @attr {boolean} data-inline - Written BY the element when it is a line's detail rather than a view of its own. Read-only.
52
+ * @attr {boolean} closable - A pane of its own: the sub-agent's name and a Close button above its conversation, and Escape inside it closes too. Both only say so (`aparte-subagent-view-close`): the app, or `connectSubagentView`, folds the pane.
53
+ *
54
+ * @fires {CustomEvent} aparte-subagent-view-close - The Close button, or Escape inside a `closable` view. The view does not hide itself: the app owns the layout. Bubbles.
52
55
  *
53
56
  * @cssprop [--aparte-subagent-indent=var(--aparte-space-6)] - The space between the rule down the leading edge and the conversation, in a standalone view.
54
57
  *
@@ -75,6 +78,10 @@ export declare class AparteSubagentView extends ElementBase {
75
78
  static get observedAttributes(): string[];
76
79
  private _chat;
77
80
  private _task;
81
+ /** A closable view's head: the sub-agent's name and Close. */
82
+ private _head;
83
+ private _name;
84
+ private _close;
78
85
  private _drawing;
79
86
  /** The config the rows were drawn with, and the segment they were drawn from. */
80
87
  private _config;
@@ -82,14 +89,20 @@ export declare class AparteSubagentView extends ElementBase {
82
89
  private _listening;
83
90
  private _stopConfig;
84
91
  private _stopWatching;
92
+ private _stopRenderers;
85
93
  private _queued;
86
94
  private _releaseQueued;
87
95
  private _warned;
88
96
  private readonly _onConversation;
97
+ private readonly _onKeydown;
98
+ /** A renderer registered or taken off on the config the rows were drawn with: the rows it changes are drawn again. */
99
+ private readonly _onRenderers;
89
100
  private readonly _onWrite;
90
101
  /** The chat, when it has no `id` for the `for` attribute: an element, or anything with `getMessages()`. */
91
102
  get chat(): SubagentViewSource | null;
92
103
  set chat(value: SubagentViewSource | null);
104
+ /** Put the focus on the sub-agent's name, in a `closable` view: where a pane that just opened starts. */
105
+ focusTitle(): void;
93
106
  /** Read the sub-agent again and draw it: what the element does on every change it hears. */
94
107
  refresh(): void;
95
108
  connectedCallback(): void;
@@ -109,6 +122,11 @@ export declare class AparteSubagentView extends ElementBase {
109
122
  /** Folds a burst of events (a whole run's end) into one read. */
110
123
  private _schedule;
111
124
  private _onConfigChange;
125
+ /** A pane of its own, never a line's detail. */
126
+ private _closable;
127
+ private _emitClose;
128
+ /** The head's words, in the chat's language: the name, and Close. */
129
+ private _relabelHead;
112
130
  private _build;
113
131
  /** Draw `anchor`'s conversation with `config`. */
114
132
  private _draw;
@@ -124,6 +142,9 @@ declare global {
124
142
  interface HTMLElementTagNameMap {
125
143
  'aparte-subagent-view': AparteSubagentView;
126
144
  }
145
+ interface HTMLElementEventMap {
146
+ 'aparte-subagent-view-close': CustomEvent<void>;
147
+ }
127
148
  }
128
149
  export {};
129
150
  //# sourceMappingURL=aparte-subagent-view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-subagent-view.d.ts","sourceRoot":"","sources":["../src/aparte-subagent-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAMH,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EACrB,MAAM,cAAc,CAAC;AAMtB,6GAA6G;AAC7G,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG;IAClD,WAAW,CAAC,EAAE,MAAM,aAAa,EAAE,CAAC;IACpC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;CAC1D,CAAC;AAeF;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG;IAAE,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAAC,IAAI,EAAE,OAA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