Skip to content

Commit 9da2221

Browse files
noamzbrbalcsida
authored andcommitted
feat: add optional messageID to ShellInput (anomalyco#20657)
1 parent f1d723f commit 9da2221

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/opencode/src/session/prompt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the
756756
}
757757
const model = input.model ?? agent.model ?? (yield* lastModel(input.sessionID))
758758
const userMsg: MessageV2.User = {
759-
id: MessageID.ascending(),
759+
id: input.messageID ?? MessageID.ascending(),
760760
sessionID: input.sessionID,
761761
time: { created: Date.now() },
762762
role: "user",
@@ -1827,6 +1827,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the
18271827

18281828
export const ShellInput = z.object({
18291829
sessionID: SessionID.zod,
1830+
messageID: MessageID.zod.optional(),
18301831
agent: z.string(),
18311832
model: z
18321833
.object({

packages/sdk/js/src/v2/gen/sdk.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,7 @@ export class Session2 extends HeyApiClient {
22312231
sessionID: string
22322232
directory?: string
22332233
workspace?: string
2234+
messageID?: string
22342235
agent?: string
22352236
model?: {
22362237
providerID: string
@@ -2248,6 +2249,7 @@ export class Session2 extends HeyApiClient {
22482249
{ in: "path", key: "sessionID" },
22492250
{ in: "query", key: "directory" },
22502251
{ in: "query", key: "workspace" },
2252+
{ in: "body", key: "messageID" },
22512253
{ in: "body", key: "agent" },
22522254
{ in: "body", key: "model" },
22532255
{ in: "body", key: "command" },

packages/sdk/js/src/v2/gen/types.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,6 +3815,7 @@ export type SessionCommandResponse = SessionCommandResponses[keyof SessionComman
38153815

38163816
export type SessionShellData = {
38173817
body?: {
3818+
messageID?: string
38183819
agent: string
38193820
model?: {
38203821
providerID: string

0 commit comments

Comments
 (0)