feat: add optional messageID to ShellInput (#20657)

pull/20702/head
Noam Bressler 2026-04-02 18:18:16 +03:00 committed by GitHub
parent 57a5236e71
commit 291a857fb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -756,7 +756,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the
} }
const model = input.model ?? agent.model ?? (yield* lastModel(input.sessionID)) const model = input.model ?? agent.model ?? (yield* lastModel(input.sessionID))
const userMsg: MessageV2.User = { const userMsg: MessageV2.User = {
id: MessageID.ascending(), id: input.messageID ?? MessageID.ascending(),
sessionID: input.sessionID, sessionID: input.sessionID,
time: { created: Date.now() }, time: { created: Date.now() },
role: "user", role: "user",
@ -1827,6 +1827,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the
export const ShellInput = z.object({ export const ShellInput = z.object({
sessionID: SessionID.zod, sessionID: SessionID.zod,
messageID: MessageID.zod.optional(),
agent: z.string(), agent: z.string(),
model: z model: z
.object({ .object({

View File

@ -2231,6 +2231,7 @@ export class Session2 extends HeyApiClient {
sessionID: string sessionID: string
directory?: string directory?: string
workspace?: string workspace?: string
messageID?: string
agent?: string agent?: string
model?: { model?: {
providerID: string providerID: string
@ -2248,6 +2249,7 @@ export class Session2 extends HeyApiClient {
{ in: "path", key: "sessionID" }, { in: "path", key: "sessionID" },
{ in: "query", key: "directory" }, { in: "query", key: "directory" },
{ in: "query", key: "workspace" }, { in: "query", key: "workspace" },
{ in: "body", key: "messageID" },
{ in: "body", key: "agent" }, { in: "body", key: "agent" },
{ in: "body", key: "model" }, { in: "body", key: "model" },
{ in: "body", key: "command" }, { in: "body", key: "command" },

View File

@ -3815,6 +3815,7 @@ export type SessionCommandResponse = SessionCommandResponses[keyof SessionComman
export type SessionShellData = { export type SessionShellData = {
body?: { body?: {
messageID?: string
agent: string agent: string
model?: { model?: {
providerID: string providerID: string