mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
d5a1792f07
Needed by #23833 Adds a `chat_file_links` association table to track which files are associated with each chat. - `AppendChatFileIDs` query links a file to a chat with deduplication - `GetChatFileMetadataByIDs` query returns lightweight file metadata by IDs - Tool-created files (e.g. `propose_plan`) are linked to the chat after insert - User-uploaded files are linked to the chat when the referencing message is sent - Single-chat GET endpoint hydrates `files: ChatFileMetadata[]` on the response > 🤖 Created by Coder Agents and massaged into shape by a human.
6 lines
146 B
SQL
6 lines
146 B
SQL
INSERT INTO chat_file_links (chat_id, file_id)
|
|
VALUES (
|
|
'72c0438a-18eb-4688-ab80-e4c6a126ef96',
|
|
'00000000-0000-0000-0000-000000000099'
|
|
);
|