feat(core): moving sessions (#30640)

This commit is contained in:
James Long 2026-06-04 15:07:46 -04:00 committed by GitHub
commit ba1b660d57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 2180 additions and 476 deletions

View file

@ -7,6 +7,8 @@ import { ToolOutput } from "../tool-output"
import { V2Schema } from "../v2-schema"
import { FileAttachment, Prompt } from "./prompt"
import { SessionSchema } from "./schema"
import { Location } from "../location"
import { RelativePath } from "../schema"
export { FileAttachment }
@ -65,6 +67,17 @@ export const ModelSwitched = EventV2.define({
})
export type ModelSwitched = typeof ModelSwitched.Type
export const Moved = EventV2.define({
type: "session.next.moved",
...options,
schema: {
...Base,
location: Location.Ref,
subdirectory: RelativePath.pipe(Schema.optional),
},
})
export type Moved = typeof Moved.Type
export const Prompted = EventV2.define({
type: "session.next.prompted",
...options,
@ -387,6 +400,7 @@ export namespace Compaction {
const DurableDefinitions = [
AgentSwitched,
ModelSwitched,
Moved,
Prompted,
Synthetic,
Shell.Started,