Add thread search, find navigation, archived and older shelves, and pin reordering
This commit is contained in:
1 parent
43347d1d58
commit
89625dddc5
17 files changed
+551
-24
No files matched your search
@@ -6,6 +6,9 @@ import {
|
||||
ORCHESTRATION_V2_WS_METHODS,
|
||||
OrchestrationV2ThreadHistoryPage,
|
||||
type OrchestrationV2Command,
|
||||
type OrchestrationV2SearchThreadsInput,
|
||||
type OrchestrationV2SearchThreadInput,
|
||||
type OrchestrationV2GetOlderSettledThreadsInput,
|
||||
type OrchestrationV2ShellSnapshot,
|
||||
type OrchestrationV2ThreadProjection,
|
||||
type ProviderApprovalDecision,
|
||||
@@ -516,6 +519,32 @@ export class T3Session {
|
||||
return result.threadId;
|
||||
}
|
||||
|
||||
/** Searches message bodies and older titles, as the web palette does. */
|
||||
searchThreads(input: OrchestrationV2SearchThreadsInput) {
|
||||
return Effect.runPromise(this.requireConnection().rpc[ORCHESTRATION_V2_WS_METHODS.searchThreads](input));
|
||||
}
|
||||
|
||||
/** Finds one occurrence and its position in the whole thread, including unloaded history. */
|
||||
searchThread(input: OrchestrationV2SearchThreadInput) {
|
||||
return Effect.runPromise(this.requireConnection().rpc[ORCHESTRATION_V2_WS_METHODS.searchThread](input));
|
||||
}
|
||||
|
||||
archivedThreads() {
|
||||
return Effect.runPromise(this.requireConnection().rpc[ORCHESTRATION_V2_WS_METHODS.getArchivedShellSnapshot]({}));
|
||||
}
|
||||
|
||||
olderSettledThreads(input: OrchestrationV2GetOlderSettledThreadsInput) {
|
||||
return Effect.runPromise(this.requireConnection().rpc[ORCHESTRATION_V2_WS_METHODS.getOlderSettledThreads](input));
|
||||
}
|
||||
|
||||
unarchiveThread(threadId: ThreadId): Promise<void> {
|
||||
return this.dispatch({ type: "thread.unarchive", commandId: newCommandId(), threadId });
|
||||
}
|
||||
|
||||
reorderThread(threadId: ThreadId, section: "pinned" | "active", orderKey: string): Promise<void> {
|
||||
return this.dispatch({ type: section === "pinned" ? "thread.pin.reorder" : "thread.active.reorder", commandId: newCommandId(), threadId, orderKey });
|
||||
}
|
||||
|
||||
/** Files and folders under `cwd` matching `query`, as the composer's @ menu searches them. */
|
||||
async searchEntries(cwd: string, query: string, limit: number): Promise<readonly ProjectEntry[]> {
|
||||
const result = await Effect.runPromise(this.requireConnection().rpc[WS_METHODS.projectsSearchEntries]({ cwd, query, limit }));
|
||||
|
||||
Reference in new issue
Block a user