Sfoglia il codice sorgente

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.
Josh Thomas 9 mesi fa
parent
commit
207a23e4d5
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      .opencode/plugin/superpowers.js

+ 3 - 3
.opencode/plugin/superpowers.js

@@ -67,7 +67,7 @@ ${toolMapping}
         path: { id: sessionID },
         body: {
           noReply: true,
-          parts: [{ type: "text", text: bootstrapContent }]
+          parts: [{ type: "text", text: bootstrapContent, synthetic: true }]
         }
       });
       return true;
@@ -132,8 +132,8 @@ ${toolMapping}
               body: {
                 noReply: true,
                 parts: [
-                  { type: "text", text: `Loading skill: ${name || skill_name}` },
-                  { type: "text", text: `${skillHeader}\n\n${content}` }
+                  { type: "text", text: `Loading skill: ${name || skill_name}`, synthetic: true },
+                  { type: "text", text: `${skillHeader}\n\n${content}`, synthetic: true }
                 ]
               }
             });