Threads and conversation model
Thread-related behavior is implemented in chat-ui-3/src-tauri/src/extensions/commands.rs.
9.1 General host threads
Use:
extension_new_thread()extension_get_thread_list()extension_get_full_thread_object()extension_update_thread()
These represent host-owned chat threads.
9.2 Extension-scoped threads
Use:
Extension-scoped threads require extensionContext. The browser host adds the frozen workspaceId, groupId, and calling extensionId to that context. Values supplied by iframe code for those fields are ignored. Listing and deletion therefore match only threads in the same extension launch scope.
9.3 Required extensionContext fields
Validated by ensure_extension_thread_context_defaults():
appNamethreadKindentityTypeentityId
Host-controlled:
extensionIdworkspaceIdgroupId
Optional:
hiddenFromMainThreadList
hiddenFromMainThreadList defaults to true in ensure_extension_thread_context_defaults().
9.4 Hidden extension threads
General thread listing excludes hidden extension threads using is_hidden_extension_thread().
9.5 Returned thread identifiers
Serialized thread responses include threadId through serialize_thread_with_flat_id().