web: create a chat through the directory picker (C2)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user