GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(session): support assistant message content updates by nexxeln · Pull Request #45015 · anomalyco/opencode

fix(session): support assistant message content updates #45015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
nexxeln merged 5 commits into v2 from message-content-update
Aug 26, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix(session): support assistant message content updates #45015

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit Hold shift + click to select a range
a7364b0
fix(session): support assistant message content updates
nexxeln Aug 25, 2026
dd2e180
chore: remove unrelated generated documentation
nexxeln Aug 25, 2026
c81a5b5
fix(session): harden assistant content updates
nexxeln Aug 25, 2026
a4162b9
refactor(session): use specific message update errors
nexxeln Aug 26, 2026
0c4eb09
refactor(session): reuse message reference for updates
nexxeln Aug 26, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Next Next commit
fix(session): support assistant message content updates
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@nexxeln
nexxeln committed Aug 25, 2026
commit a7364b0e55fabce343c7e1a0802f2e6d5e075d4b

There are no files selected for viewing

42 changes: 34 additions & 8 deletions 42 packages/client/src/effect/api/api.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,19 @@ export type SessionLogOutput =
readonly location?: Location.Ref | undefined
readonly data: { readonly sessionID: Session.ID; readonly idle: number }
}
| {
readonly id: Event.ID
readonly created: number
readonly metadata?: { readonly [x: string]: unknown } | undefined
readonly type: "session.message.content.updated"
readonly durable: { readonly aggregateID: string; readonly seq: Event.Seq; readonly version: Event.Version }
readonly location?: Location.Ref | undefined
readonly data: {
readonly sessionID: Session.ID
readonly messageID: SessionMessage.ID
readonly content: ReadonlyArray<SessionMessage.AssistantContentEncoded>
}
}
| {
readonly id: Event.ID
readonly created: number
Expand Down Expand Up @@ -675,7 +688,7 @@ export type SessionLogOutput =
readonly assistantMessageID: SessionMessage.ID
readonly finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown"
readonly rawFinish?: string | undefined
readonly providerState?: SessionMessage.ProviderState | undefined
readonly providerState?: { readonly [x: string]: unknown } | undefined
readonly cost: number & Brand.Brand<"Money.USD">
readonly tokens: {
readonly input: number
Expand All @@ -700,7 +713,7 @@ export type SessionLogOutput =
readonly error: { readonly type: string; readonly message: string; readonly status?: number | undefined }
readonly finish?: "content-filter" | undefined
readonly rawFinish?: string | undefined
readonly providerState?: SessionMessage.ProviderState | undefined
readonly providerState?: { readonly [x: string]: unknown } | undefined
readonly cost?: (number & Brand.Brand<"Money.USD">) | undefined
readonly tokens?:
| {
Expand Down Expand Up @@ -739,7 +752,7 @@ export type SessionLogOutput =
readonly assistantMessageID: SessionMessage.ID
readonly ordinal: number
readonly text: string
readonly state?: SessionMessage.ProviderState | undefined
readonly state?: { readonly [x: string]: unknown } | undefined
}
}
| {
Expand All @@ -753,7 +766,7 @@ export type SessionLogOutput =
readonly sessionID: Session.ID
readonly assistantMessageID: SessionMessage.ID
readonly ordinal: number
readonly state?: SessionMessage.ProviderState | undefined
readonly state?: { readonly [x: string]: unknown } | undefined
}
}
| {
Expand All @@ -768,7 +781,7 @@ export type SessionLogOutput =
readonly assistantMessageID: SessionMessage.ID
readonly ordinal: number
readonly text: string
readonly state?: SessionMessage.ProviderState | undefined
readonly state?: { readonly [x: string]: unknown } | undefined
}
}
| {
Expand Down Expand Up @@ -812,7 +825,7 @@ export type SessionLogOutput =
readonly id: string
readonly input: { readonly [x: string]: unknown }
readonly executed: boolean
readonly state?: SessionMessage.ProviderState | undefined
readonly state?: { readonly [x: string]: unknown } | undefined
}
}
| {
Expand Down Expand Up @@ -848,7 +861,7 @@ export type SessionLogOutput =
]
readonly metadata?: { readonly [x: string]: Schema.Json } | undefined
readonly executed: boolean
readonly resultState?: SessionMessage.ProviderState | undefined
readonly resultState?: { readonly [x: string]: unknown } | undefined
}
}
| {
Expand Down Expand Up @@ -887,7 +900,7 @@ export type SessionLogOutput =
| undefined
readonly metadata?: { readonly [x: string]: Schema.Json } | undefined
readonly executed: boolean
readonly resultState?: SessionMessage.ProviderState | undefined
readonly resultState?: { readonly [x: string]: unknown } | undefined
}
}
| {
Expand Down Expand Up @@ -1013,6 +1026,18 @@ export type SessionMessageInput = { readonly sessionID: Session.ID; readonly mes
export type SessionMessageOutput = SessionMessage.Info
export type SessionMessageOperation<E = never> = (input: SessionMessageInput) => Effect.Effect<SessionMessageOutput, E>

export type SessionMessageUpdateInput = {
readonly sessionID: Session.ID
readonly messageID: SessionMessage.ID
readonly content: ReadonlyArray<
SessionMessage.AssistantText | SessionMessage.AssistantReasoning | SessionMessage.AssistantTool
>
}
export type SessionMessageUpdateOutput = SessionMessage.Assistant
export type SessionMessageUpdateOperation<E = never> = (
input: SessionMessageUpdateInput,
) => Effect.Effect<SessionMessageUpdateOutput, E>

export type SessionEnvironmentInput = {
readonly sessionID: Session.ID
readonly variables: { readonly [x: string]: string }
Expand Down Expand Up @@ -1071,6 +1096,7 @@ export interface SessionApi<E = never> {
readonly interrupt: SessionInterruptOperation<E>
readonly background: SessionBackgroundOperation<E>
readonly message: SessionMessageOperation<E>
readonly messageUpdate: SessionMessageUpdateOperation<E>
readonly environment: SessionEnvironmentOperation<E>
readonly view: SessionViewOperation<E>
}
Expand Down
14 changes: 14 additions & 0 deletions 14 packages/client/src/effect/generated/client.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ import type {
SessionBackgroundOutput,
SessionMessageInput,
SessionMessageOutput,
SessionMessageUpdateInput,
SessionMessageUpdateOutput,
SessionEnvironmentInput,
SessionEnvironmentOutput,
SessionViewInput,
Expand Down Expand Up @@ -649,6 +651,17 @@ const EndpointSessionMessage = (raw: RawClient["server.session"]) => (input: Ses
),
)

const EndpointSessionMessageUpdate = (raw: RawClient["server.session"]) => (input: SessionMessageUpdateInput) =>
preserveEffect<SessionMessageUpdateOutput>()(
raw["session.messageUpdate"]({
params: { sessionID: input["sessionID"], messageID: input["messageID"] },
payload: { content: input["content"] },
}).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
),
)

const EndpointSessionEnvironment = (raw: RawClient["server.session"]) => (input: SessionEnvironmentInput) =>
preserveEffect<SessionEnvironmentOutput>()(
raw["session.environment"]({
Expand Down Expand Up @@ -709,6 +722,7 @@ const adaptGroupSession = (raw: RawClient["server.session"]) => ({
interrupt: EndpointSessionInterrupt(raw),
background: EndpointSessionBackground(raw),
message: EndpointSessionMessage(raw),
messageUpdate: EndpointSessionMessageUpdate(raw),
environment: EndpointSessionEnvironment(raw),
view: EndpointSessionView(raw),
})
Expand Down
14 changes: 14 additions & 0 deletions 14 packages/client/src/promise/generated/client.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ import type {
SessionBackgroundOutput,
SessionMessageInput,
SessionMessageOutput,
SessionMessageUpdateInput,
SessionMessageUpdateOutput,
SessionEnvironmentInput,
SessionEnvironmentOutput,
SessionViewInput,
Expand Down Expand Up @@ -927,6 +929,18 @@ export function make(options: ClientOptions) {
},
requestOptions,
).then((value) => value.data),
messageUpdate: (input: SessionMessageUpdateInput, requestOptions?: RequestOptions) =>
request<{ readonly data: SessionMessageUpdateOutput }>(
{
method: "PATCH",
path: `/api/session/${encodeURIComponent(input.sessionID)}/message/${encodeURIComponent(input.messageID)}`,
body: { content: input["content"] },
successStatus: 200,
declaredStatuses: [404, 400, 409, 401],
empty: false,
},
requestOptions,
).then((value) => value.data),
environment: (input: SessionEnvironmentInput, requestOptions?: RequestOptions) =>
request<SessionEnvironmentOutput>(
{
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.