mirror of
https://github.com/obra/superpowers.git
synced 2026-04-24 02:19:05 +08:00
fix(opencode): Use synthetic: true for invisible content injection (#122)
The OpenCode plugin injects the bootstrap and skill content as visible user messages. While `noReply: true` prevents an AI response, the injected content still appears in the chat UI which makes it just a bit noisy. OpenCode's `TextPartInput` supports a `synthetic` Boolean property that hides parts from the UI while keeping them visible to the AI -- it's been available in the v2 message format since around the v1.0.0 version bump.
This commit is contained in:
@@ -67,7 +67,7 @@ ${toolMapping}
|
|||||||
path: { id: sessionID },
|
path: { id: sessionID },
|
||||||
body: {
|
body: {
|
||||||
noReply: true,
|
noReply: true,
|
||||||
parts: [{ type: "text", text: bootstrapContent }]
|
parts: [{ type: "text", text: bootstrapContent, synthetic: true }]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@@ -132,8 +132,8 @@ ${toolMapping}
|
|||||||
body: {
|
body: {
|
||||||
noReply: true,
|
noReply: true,
|
||||||
parts: [
|
parts: [
|
||||||
{ type: "text", text: `Loading skill: ${name || skill_name}` },
|
{ type: "text", text: `Loading skill: ${name || skill_name}`, synthetic: true },
|
||||||
{ type: "text", text: `${skillHeader}\n\n${content}` }
|
{ type: "text", text: `${skillHeader}\n\n${content}`, synthetic: true }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user