mirror of
https://github.com/hanzoai/dev-desktop.git
synced 2026-11-23 05:52:02 +00:00
When the cloud's chat adapter upgrades a session into the person's cell, the Dev server there had never heard of the chat threads (hanzo-inc/cloud#910). - contracts: chatThreads.import takes threads (id, title, model, times, user and assistant messages) and an optional project, the server's one project when omitted; ChatThreadImportProjectAmbiguousError when there are several. - server: AgentSessionImporter.importChatThreads commits each thread as run-less history (historyOrigin v1_import, no provider thread) under the id the client holds, through the same messageEvents an agent-session import uses, so the first run in the cell is handed the conversation as context (shouldPrepareLegacyImportHandoff). A thread already there is left alone: the same messages count as imported, anything else as skipped, so a second upgrade writes nothing. A thread that fails to commit is logged and skipped. - go/frame: Adapter.ImportRequest(id) renders every thread the adapter holds as that request frame.
Server
Node.js WebSocket server for the Hanzo Dev app.