Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
f36a9ea
feat: Add /continue command for interrupted conversations
ariane-emory Dec 7, 2025
ae76551
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 7, 2025
8a9f370
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 7, 2025
55216bb
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 7, 2025
1213887
tidy: unwanted indentation.
ariane-emory Dec 8, 2025
af450a8
Merge upstream/dev into feat/continue-command
ariane-emory Dec 8, 2025
3e066aa
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 8, 2025
b31cb9d
fix: resolve TypeScript errors after dev merge
ariane-emory Dec 8, 2025
c600ac6
fix: make /continue command work correctly
ariane-emory Dec 8, 2025
088be14
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 9, 2025
ac88fc3
fix: restore corrupted file
ariane-emory Dec 9, 2025
6f252e8
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 9, 2025
56f2d3a
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 9, 2025
1358040
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 10, 2025
b382f7f
Merge dev into feat/continue-command
ariane-emory Dec 10, 2025
e56e7fd
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 10, 2025
c45042e
Merge remote-tracking branch 'upstream/dev' into feat/continue-command
ariane-emory Dec 10, 2025
3d039fa
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 10, 2025
91ad622
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 11, 2025
0a125d2
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 11, 2025
e25157d
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 12, 2025
76f79f8
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 12, 2025
cfdfd5d
tidy: revert unwanted change.
ariane-emory Dec 12, 2025
8c3eeea
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 13, 2025
b7b35e1
chore: revert v1 SDK changes (not needed for TUI /continue)
ariane-emory Dec 15, 2025
7517ee9
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 17, 2025
2e14cdf
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 17, 2025
edb5c2d
Merge remote-tracking branch 'origin/dev' into feat/continue-command
ariane-emory Dec 18, 2025
9b44146
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 19, 2025
b53459e
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 19, 2025
e081d98
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 20, 2025
2163c46
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 20, 2025
bbf721b
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 21, 2025
2f5c312
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 21, 2025
379b4aa
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 22, 2025
c5b6b44
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 23, 2025
c6a0546
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 23, 2025
7e1d414
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 23, 2025
2e5edc0
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 23, 2025
32c5cd5
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 23, 2025
01b6c37
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 23, 2025
d0d6ad0
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 24, 2025
7ce1098
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 24, 2025
23bf864
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 24, 2025
d9ecad5
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 24, 2025
da7e990
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 25, 2025
64161d0
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 25, 2025
f6ed45d
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 25, 2025
9877654
Add session_continue to Keybinds schema
ariane-emory Dec 26, 2025
0ddea5b
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 26, 2025
fe5119c
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 27, 2025
7976095
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 27, 2025
ff4f475
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 27, 2025
b44ad83
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 28, 2025
6e2c3e0
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 28, 2025
5102653
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 28, 2025
7a18056
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 29, 2025
c133813
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 29, 2025
008eb75
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 29, 2025
7bffa3d
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 29, 2025
63f11f8
Merge branch 'feat/continue-command' of github.com:ariane-emory/openc…
ariane-emory Dec 29, 2025
3a69472
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 29, 2025
d233a7a
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
83bf353
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
2a62f15
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
ba213d0
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
307c147
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
9f5bccf
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
11dd0b4
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 30, 2025
ce74206
Merge branch 'dev' into feat/continue-command
ariane-emory Dec 31, 2025
a4a7d08
Merge dev into feat/continue-command
ariane-emory Jan 1, 2026
c2f612b
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 1, 2026
4bbd983
Merge dev into feat/continue-command
ariane-emory Jan 1, 2026
ae09763
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 2, 2026
5dfac5a
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 3, 2026
b97e2e8
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 3, 2026
99793fb
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 4, 2026
5ab1c6d
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 4, 2026
3766750
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 4, 2026
11202c9
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 5, 2026
fa984df
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 5, 2026
f7d3bd6
Merge branch 'feat/continue-command' of github.com:ariane-emory/openc…
ariane-emory Jan 5, 2026
e8aeb35
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 5, 2026
fd36018
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 5, 2026
02361d5
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 5, 2026
4a1c5da
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 6, 2026
40ed008
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 6, 2026
1a4540a
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 6, 2026
699cc9a
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 6, 2026
cb62ba2
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 6, 2026
c57b25d
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 7, 2026
324e375
fix: infinite type error
ariane-emory Jan 7, 2026
8667e67
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 7, 2026
805b21d
Merge branch 'feat/continue-command' of github.com:ariane-emory/openc…
ariane-emory Jan 7, 2026
fac7d9c
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 7, 2026
be4323d
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 7, 2026
aeff17b
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 7, 2026
f1679fd
Merge branch 'feat/continue-command' of github.com:ariane-emory/openc…
ariane-emory Jan 7, 2026
e228023
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 7, 2026
997930c
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 11, 2026
ec9a964
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 13, 2026
a5c94c5
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 13, 2026
79d97db
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 15, 2026
f46719c
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 16, 2026
22d8f7b
Merge dev into feat/continue-command, preserving session routes and d…
ariane-emory Jan 17, 2026
d23ce95
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 17, 2026
c50a7e1
Merge dev into feat/continue-command
ariane-emory Jan 19, 2026
2c08867
Fix merge conflicts in autocomplete component
ariane-emory Jan 19, 2026
f84debd
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 20, 2026
b8e48a2
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 22, 2026
5dbc5f3
fix: restore /continue command functionality
ariane-emory Jan 22, 2026
da816b6
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 23, 2026
f2b509b
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 25, 2026
3b61852
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 25, 2026
0e38393
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 26, 2026
3a9b2b5
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 27, 2026
befa549
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 29, 2026
9410553
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 29, 2026
3bc8e4f
Merge branch 'dev' into feat/continue-command
ariane-emory Jan 30, 2026
d2bc839
Merge branch 'dev' into feat/continue-command
ariane-emory Feb 1, 2026
7e8e591
Merge branch 'dev' into feat/continue-command
ariane-emory Feb 2, 2026
b75b7b8
Merge branch 'dev' into feat/continue-command
ariane-emory Feb 3, 2026
bca5b58
fix: resolve TypeScript errors from dev merge
ariane-emory Feb 3, 2026
8c96f49
Merge dev into feat/continue-command
ariane-emory Feb 4, 2026
f37461c
Merge branch 'dev' into feat/continue-command
ariane-emory Feb 4, 2026
0f056c9
Merge branch 'dev' into feat/continue-command
ariane-emory Feb 6, 2026
4681e2f
Merge dev into feat/continue-command
ariane-emory Feb 6, 2026
1211e24
Merge branch 'feat/continue-command' of github.com:ariane-emory/openc…
ariane-emory Feb 6, 2026
856da23
Merge branch 'dev' into feat/continue-command
ariane-emory Feb 6, 2026
c29f3e6
Merge branch 'dev' into feat/configurable-snapshot-lifespan
ariane-emory Feb 6, 2026
7b5f260
Merge dev into feat/configurable-snapshot-lifespan
ariane-emory Feb 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/opencode/src/cli/cmd/tui/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export function tui(input: {
gatherStats: false,
exitOnCtrlC: false,
useKittyKeyboard: {},
autoFocus: false,
consoleOptions: {
keyBindings: [{ name: "y", ctrl: true, action: "copy-selection" }],
onCopySelection: (text) => {
Expand Down
20 changes: 20 additions & 0 deletions packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,26 @@ export function Session() {
})
},
},
{
title: "Continue interrupted conversation",
value: "session.continue",
keybind: "session_continue",
category: "Session",
slash: {
name: "continue",
},
onSelect: async (dialog) => {
const result = await sdk.client.session.continue({
sessionID: route.sessionID,
})

if (result.data) {
toBottom()
} else {
dialog.clear()
}
},
},
{
title: sidebarVisible() ? "Hide sidebar" : "Show sidebar",
value: "session.sidebar.toggle",
Expand Down
1 change: 1 addition & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ export namespace Config {
session_child_cycle: z.string().optional().default("<leader>right").describe("Next child session"),
session_child_cycle_reverse: z.string().optional().default("<leader>left").describe("Previous child session"),
session_parent: z.string().optional().default("<leader>up").describe("Go to parent session"),
session_continue: z.string().optional().default("").describe("Continue interrupted conversation"),
terminal_suspend: z.string().optional().default("ctrl+z").describe("Suspend terminal"),
terminal_title_toggle: z.string().optional().default("none").describe("Toggle terminal title"),
tips_toggle: z.string().optional().default("<leader>h").describe("Toggle tips on home screen"),
Expand Down
5 changes: 2 additions & 3 deletions packages/opencode/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { createGateway } from "@ai-sdk/gateway"
import { createTogetherAI } from "@ai-sdk/togetherai"
import { createPerplexity } from "@ai-sdk/perplexity"
import { createVercel } from "@ai-sdk/vercel"
import { createGitLab, VERSION as GITLAB_PROVIDER_VERSION } from "@gitlab/gitlab-ai-provider"
import { createGitLab } from "@gitlab/gitlab-ai-provider"
import { ProviderTransform } from "./transform"
import { Installation } from "../installation"

Expand Down Expand Up @@ -429,7 +429,7 @@ export namespace Provider {
const providerConfig = config.provider?.["gitlab"]

const aiGatewayHeaders = {
"User-Agent": `opencode/${Installation.VERSION} gitlab-ai-provider/${GITLAB_PROVIDER_VERSION} (${os.platform()} ${os.release()}; ${os.arch()})`,
"User-Agent": `opencode/${Installation.VERSION} gitlab-ai-provider/${"unknown"} (${os.platform()} ${os.release()}; ${os.arch()})`,
...(providerConfig?.options?.aiGatewayHeaders || {}),
}

Expand All @@ -447,7 +447,6 @@ export namespace Provider {
},
async getModel(sdk: ReturnType<typeof createGitLab>, modelID: string) {
return sdk.agenticChat(modelID, {
aiGatewayHeaders,
featureFlags: {
duo_agent_platform_agentic_chat: true,
duo_agent_platform: true,
Expand Down
71 changes: 71 additions & 0 deletions packages/opencode/src/server/routes/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,77 @@ export const SessionRoutes = lazy(() =>
return c.json(session)
},
)
.post(
"/:sessionID/continue",
describeRoute({
summary: "Continue interrupted conversation",
description:
"Continue a conversation that was interrupted, reverting incomplete assistant messages and resuming processing.",
operationId: "session.continue",
responses: {
200: {
description: "Conversation continued",
content: {
"application/json": {
schema: resolver(z.boolean()),
},
},
},
...errors(400, 404),
},
}),
validator(
"param",
z.object({
sessionID: z.string().meta({ description: "Session ID" }),
}),
),
async (c) => {
const sessionID = c.req.valid("param").sessionID

// Check if session has an unfinished assistant message
const msgs = await Session.messages({ sessionID })
let lastAssistant: MessageV2.Assistant | undefined

for (let i = msgs.length - 1; i >= 0; i--) {
const msg = msgs[i]
if (msg.info.role === "assistant") {
lastAssistant = msg.info as MessageV2.Assistant
break
}
}

// If no unfinished assistant message, return false
if (lastAssistant?.finish && !["tool-calls", "unknown"].includes(lastAssistant.finish)) {
return c.json(false)
}

// Find the last user message to revert to
let lastUserID: string | undefined
for (let i = msgs.length - 1; i >= 0; i--) {
const msg = msgs[i]
if (msg.info.role === "user") {
lastUserID = msg.info.id
break
}
}

if (!lastUserID) {
return c.json(false)
}

// Revert the unfinished assistant message
await SessionRevert.revert({
sessionID,
messageID: lastUserID,
})

// Start the conversation loop to continue
await SessionPrompt.loop(sessionID)

return c.json(true)
},
)
.post(
"/:sessionID/permissions/:permissionID",
describeRoute({
Expand Down
Empty file added packages/sdk/js/openapi.json
Empty file.
30 changes: 30 additions & 0 deletions packages/sdk/js/src/v2/gen/sdk.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ import type {
SessionChildrenResponses,
SessionCommandErrors,
SessionCommandResponses,
SessionContinueErrors,
SessionContinueResponses,
SessionCreateErrors,
SessionCreateResponses,
SessionDeleteErrors,
Expand Down Expand Up @@ -1766,6 +1768,34 @@ export class Session extends HeyApiClient {
...params,
})
}

/**
* Continue interrupted conversation
*/
public continue<ThrowOnError extends boolean = false>(
parameters: {
sessionID: string
directory?: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "path", key: "sessionID" },
{ in: "query", key: "directory" },
],
},
],
)
return (options?.client ?? this.client).post<SessionContinueResponses, SessionContinueErrors, ThrowOnError>({
url: "/session/{sessionID}/continue",
...options,
...params,
})
}
}

export class Part extends HeyApiClient {
Expand Down
37 changes: 37 additions & 0 deletions packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,10 @@ export type KeybindsConfig = {
* Go to parent session
*/
session_parent?: string
/**
* Continue interrupted conversation
*/
session_continue?: string
/**
* Suspend terminal
*/
Expand Down Expand Up @@ -3767,6 +3771,39 @@ export type SessionUnrevertResponses = {

export type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses]

export type SessionContinueData = {
body?: never
path: {
sessionID: string
}
query?: {
directory?: string
}
url: "/session/{sessionID}/continue"
}

export type SessionContinueErrors = {
/**
* Bad request
*/
400: BadRequestError
/**
* Not found
*/
404: NotFoundError
}

export type SessionContinueError = SessionContinueErrors[keyof SessionContinueErrors]

export type SessionContinueResponses = {
/**
* Conversation continued
*/
200: boolean
}

export type SessionContinueResponse = SessionContinueResponses[keyof SessionContinueResponses]

export type PermissionRespondData = {
body?: {
response: "once" | "always" | "reject"
Expand Down