feat(session): filter v2 session list by parent (#35037)

Co-authored-by: Dax <mail@thdxr.com>
This commit is contained in:
opencode-agent[bot]
2026-07-02 19:48:49 -04:00
committed by GitHub
co-authored by Dax
parent 7ebd344fa2
commit 6555df912a
17 changed files with 180 additions and 21 deletions
@@ -45,6 +45,7 @@ type Endpoint4_0Input = {
readonly limit?: Endpoint4_0Request["query"]["limit"]
readonly order?: Endpoint4_0Request["query"]["order"]
readonly search?: Endpoint4_0Request["query"]["search"]
readonly parentID?: Endpoint4_0Request["query"]["parentID"]
readonly directory?: Endpoint4_0Request["query"]["directory"]
readonly project?: Endpoint4_0Request["query"]["project"]
readonly subpath?: Endpoint4_0Request["query"]["subpath"]
@@ -57,6 +58,7 @@ const Endpoint4_0 = (raw: RawClient["server.session"]) => (input?: Endpoint4_0In
limit: input?.["limit"],
order: input?.["order"],
search: input?.["search"],
parentID: input?.["parentID"],
directory: input?.["directory"],
project: input?.["project"],
subpath: input?.["subpath"],
+6 -1
View File
@@ -356,6 +356,7 @@ export function make(options: ClientOptions) {
limit: input?.["limit"],
order: input?.["order"],
search: input?.["search"],
parentID: input?.["parentID"],
directory: input?.["directory"],
project: input?.["project"],
subpath: input?.["subpath"],
@@ -1361,7 +1362,11 @@ function encodePath(value: string): string {
}
function appendQuery(params: URLSearchParams, key: string, value: unknown): void {
if (value === undefined || value === null) return
if (value === undefined) return
if (value === null) {
params.append(key, "null")
return
}
if (Array.isArray(value)) {
for (const item of value) appendQuery(params, key, item)
return
+19
View File
@@ -218,6 +218,7 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
@@ -228,6 +229,7 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
@@ -238,6 +240,7 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
@@ -248,16 +251,29 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
readonly cursor?: string | undefined
}["search"]
readonly parentID?: {
readonly workspace?: string | undefined
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
readonly cursor?: string | undefined
}["parentID"]
readonly directory?: {
readonly workspace?: string | undefined
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
@@ -268,6 +284,7 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
@@ -278,6 +295,7 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined
@@ -288,6 +306,7 @@ export type SessionListInput = {
readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly parentID?: string | null | undefined
readonly directory?: string | undefined
readonly project?: string | undefined
readonly subpath?: string | undefined