@colletdev/docs 0.2.21 → 0.2.22

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.
Files changed (2) hide show
  1. package/components.md +13 -3
  2. package/package.json +1 -1
package/components.md CHANGED
@@ -501,7 +501,7 @@ Import from `@colletdev/core/types`:
501
501
 
502
502
  Chat component.
503
503
 
504
- **Tag:** `<cx-chat>` | **Form:** no | **Slots:** header, footer | **Ref methods:** addMessage, addUserMessage, addAssistantMessage, addGroupMessage, addActivity, scrollToBottom, clear, focus, addFiles, clearAttachments
504
+ **Tag:** `<cx-chat>` | **Form:** no | **Slots:** header, footer | **Ref methods:** addMessage, addUserMessage, addAssistantMessage, addGroupMessage, addActivity, scrollToBottom, clear, focus, getValue, setValue, startStreamingTurn, removeMessage, updateMessage, addFiles, clearAttachments
505
505
 
506
506
  #### Import
507
507
 
@@ -539,6 +539,7 @@ Chat component.
539
539
  | accept | `string` | — | |
540
540
  | maxFileSize | `number` | `0` | |
541
541
  | multipleFiles | `boolean` | `false` | |
542
+ | inputSubmitting | `boolean` | `false` | |
542
543
 
543
544
  #### Events
544
545
 
@@ -553,7 +554,7 @@ Chat component.
553
554
 
554
555
  | Method | Description |
555
556
  |--------|-------------|
556
- | `addMessage(html: string): void` | Adds a pre-rendered HTML turn to the chat (low-level). Prefer addUserMessage/addAssistantMessage. |
557
+ | `addMessage(html: string, opts?: { id?: string }): string` | Adds a pre-rendered HTML turn to the chat (low-level). Prefer addUserMessage/addAssistantMessage. Returns the turn ID. |
557
558
  | `addUserMessage(content: string, opts?: BubbleOptions): void` | Adds a user message. Renders via WASM automatically. |
558
559
  | `addAssistantMessage(content: string, opts?: BubbleOptions): void` | Adds an assistant message. Renders via WASM automatically. |
559
560
  | `addGroupMessage(role: "user" | "assistant", parts: GroupPart[], opts?: GroupOptions): void` | Adds a multi-part grouped message (text + code, etc.). |
@@ -561,6 +562,11 @@ Chat component.
561
562
  | `scrollToBottom()` | Scrolls the message area to the bottom. |
562
563
  | `clear()` | Clears all messages from the chat. |
563
564
  | `focus()` | Focuses the chat input textarea. |
565
+ | `getValue(): string` | Returns the current input textarea value. |
566
+ | `setValue(value: string): void` | Sets the input textarea value programmatically. |
567
+ | `startStreamingTurn(role?: "user" | "assistant", opts?: { id?: string; senderName?: string; size?: string }): StreamHandle` | Starts a streaming assistant turn. Returns a handle with appendTokens() and end(). |
568
+ | `removeMessage(id: string): boolean` | Removes a message by turn ID. |
569
+ | `updateMessage(id: string, html: string): boolean` | Updates a message's HTML by turn ID. |
564
570
  | `addFiles(files: FileList): void` | Adds files programmatically to the chat input. |
565
571
  | `clearAttachments()` | Removes all file attachments from the chat input. |
566
572
 
@@ -577,6 +583,7 @@ Import from `@colletdev/core/types`:
577
583
  - `FileRemoveDetail`
578
584
  - `GroupOptions`
579
585
  - `GroupPart`
586
+ - `StreamHandle`
580
587
 
581
588
  ---
582
589
 
@@ -584,7 +591,7 @@ Import from `@colletdev/core/types`:
584
591
 
585
592
  Multi-line text area optimized for chat message composition.
586
593
 
587
- **Tag:** `<cx-chat-input>` | **Form:** yes | **Ref methods:** focus, addFiles, getAttachments, clearAttachments
594
+ **Tag:** `<cx-chat-input>` | **Form:** yes | **Ref methods:** focus, getValue, setValue, addFiles, getAttachments, clearAttachments
588
595
 
589
596
  #### Import
590
597
 
@@ -616,6 +623,7 @@ Multi-line text area optimized for chat message composition.
616
623
  | accept | `string` | — | |
617
624
  | maxFileSize | `number` | `0` | |
618
625
  | multipleFiles | `boolean` | `false` | |
626
+ | submitting | `boolean` | `false` | |
619
627
 
620
628
  #### Events
621
629
 
@@ -636,6 +644,8 @@ Multi-line text area optimized for chat message composition.
636
644
  | Method | Description |
637
645
  |--------|-------------|
638
646
  | `focus()` | Focuses the textarea. |
647
+ | `getValue(): string` | Returns the current textarea value. |
648
+ | `setValue(value: string): void` | Sets the textarea value programmatically. |
639
649
  | `addFiles(files: FileList): void` | Adds files programmatically to the attachment tray. |
640
650
  | `getAttachments(): FileInfo[]` | Returns current attachments as FileInfo[]. |
641
651
  | `clearAttachments()` | Removes all file attachments. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colletdev/docs",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "Collet component library documentation — API reference, framework guides, and AI agent setup",
5
5
  "type": "module",
6
6
  "bin": {