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 — feat(tasks): Add model info as part of metadata (#10307) · bpd1069/opencode@4173adf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/opencode/src/tool
    • task.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/tool/task.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/tool/task.ts
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,16 @@ export const TaskTool = Tool.define("task", async (ctx) => {
9999
const msg = await MessageV2.get({ sessionID: ctx.sessionID, messageID: ctx.messageID })
100100
if (msg.info.role !== "assistant") throw new Error("Not an assistant message")
101101

102+
const model = agent.model ?? {
103+
modelID: msg.info.modelID,
104+
providerID: msg.info.providerID,
105+
}
106+
102107
ctx.metadata({
103108
title: params.description,
104109
metadata: {
105110
sessionId: session.id,
111+
model,
106112
},
107113
})
108114

@@ -126,15 +132,11 @@ export const TaskTool = Tool.define("task", async (ctx) => {
126132
metadata: {
127133
summary: Object.values(parts).sort((a, b) => a.id.localeCompare(b.id)),
128134
sessionId: session.id,
135+
model,
129136
},
130137
})
131138
})
132139

133-
const model = agent.model ?? {
134-
modelID: msg.info.modelID,
135-
providerID: msg.info.providerID,
136-
}
137-
138140
function cancel() {
139141
SessionPrompt.cancel(session.id)
140142
}
@@ -180,6 +182,7 @@ export const TaskTool = Tool.define("task", async (ctx) => {
180182
metadata: {
181183
summary,
182184
sessionId: session.id,
185+
model,
183186
},
184187
output,
185188
}

0 commit comments

Comments
0 (0)
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.