@link-assistant/agent 0.8.7 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/session/index.ts +12 -0
package/package.json
CHANGED
package/src/session/index.ts
CHANGED
|
@@ -547,6 +547,18 @@ export namespace Session {
|
|
|
547
547
|
return obj.reason;
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
+
// Handle AI SDK unified/raw format: {unified: "tool-calls", raw: "tool_calls"}
|
|
551
|
+
// See: https://github.com/link-assistant/agent/issues/129
|
|
552
|
+
if (typeof obj.unified === 'string') {
|
|
553
|
+
if (Flag.OPENCODE_VERBOSE) {
|
|
554
|
+
log.debug(() => ({
|
|
555
|
+
message: 'toFinishReason extracted unified from object',
|
|
556
|
+
result: obj.unified,
|
|
557
|
+
}));
|
|
558
|
+
}
|
|
559
|
+
return obj.unified;
|
|
560
|
+
}
|
|
561
|
+
|
|
550
562
|
// If we can't extract a specific field, return JSON representation
|
|
551
563
|
if (Flag.OPENCODE_VERBOSE) {
|
|
552
564
|
log.debug(() => ({
|