fix: optional chaining on chat.params provider/model access

This commit is contained in:
Vectry
2026-02-10 11:49:17 +00:00
parent bdd6362c1a
commit 7e44ccb9e7
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "opencode-agentlens", "name": "opencode-agentlens",
"version": "0.1.2", "version": "0.1.3",
"description": "OpenCode plugin for AgentLens — trace your coding agent's decisions, tool calls, and sessions", "description": "OpenCode plugin for AgentLens — trace your coding agent's decisions, tool calls, and sessions",
"type": "module", "type": "module",
"main": "./dist/index.cjs", "main": "./dist/index.cjs",

View File

@@ -207,8 +207,8 @@ const plugin: Plugin = async ({ project, directory, worktree }) => {
name: "chat.params", name: "chat.params",
metadata: safeJsonValue({ metadata: safeJsonValue({
agent: input.agent, agent: input.agent,
model: input.model.id, model: input.model?.id,
provider: input.provider.info.id, provider: input.provider?.info?.id,
temperature: output.temperature, temperature: output.temperature,
topP: output.topP, topP: output.topP,
topK: output.topK, topK: output.topK,