web: create a chat through the directory picker (C2)

This commit is contained in:
2026-10-19 14:25:42 +01:00
parent 2fe63012f9
commit a7872c3f31
9 changed files with 841 additions and 36 deletions
+12
View File
@@ -383,6 +383,18 @@ export class PipelinesRepository {
});
}
/**
* Lists the directories a new chat can live in (C2), mirroring
* `PipelinesRepository.chatDirectories`: a bare `{type:'chat_directories'}` with
* no body, replying in `chat_directories` (home first, then recent operator
* directories). An older server that returns no field answers with an empty
* list; the view still offers home so the picker is never empty.
*/
async chatDirectories() {
const response = await this.#client.call({ type: Protocol.CHAT_DIRECTORIES });
return response[ChatKeys.DIRECTORIES] ?? [];
}
/**
* Creates one session in an explicit directory (mirrors
* `PipelinesRepository.chatCreate`). The directory is always sent, so a chat is