Skip to content

Commit 5385c8e

Browse files
committed
chore(api): add typings to fork_session
1 parent f0d5416 commit 5385c8e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/opencode/api.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,10 @@ function M.commands_list()
537537

538538
for name, def in pairs(commands) do
539539
local desc = def.description or ''
540-
table.insert(msg, string.format('| %s | %s | %s |', name, desc, tostring(config_file.command_takes_arguments(def))))
540+
table.insert(
541+
msg,
542+
string.format('| %s | %s | %s |', name, desc, tostring(config_file.commapiand_takes_arguments(def)))
543+
)
541544
end
542545

543546
table.insert(msg, '')
@@ -702,6 +705,8 @@ function M.timeline()
702705
end)
703706
end
704707

708+
--- Forks the current session from a specific user message.
709+
---@param message_id? string The ID of the user message to fork from. If not provided, uses the last user message.
705710
function M.fork_session(message_id)
706711
if not state.active_session then
707712
vim.notify('No active session to fork', vim.log.levels.WARN)

0 commit comments

Comments
 (0)