mirror of
https://github.com/bendtherules/opencode-plugin-compaction-prompt.git
synced 2026-08-18 13:42:55 +00:00
fix: correct $ARGUMENTS token in plugin-compaction-init template
OpenCode's argument token is $ARGUMENTS, not $ARGUMENTS$. With the extra dollar sign, OpenCode did not substitute the token, so the LLM ended up writing the literal $ARGUMENTS$ line into the memory file when no arguments were passed.
This commit is contained in:
+3
-3
@@ -179,10 +179,10 @@ describe("buildInitCommandTemplate", () => {
|
||||
expect(template).toContain("## Discard\n");
|
||||
});
|
||||
|
||||
test("leaves $ARGUMENTS$ unsubstituted for OpenCode to fill in", () => {
|
||||
test("leaves $ARGUMENTS unsubstituted for OpenCode to fill in", () => {
|
||||
const template = buildInitCommandTemplate(".opencode/compaction.md");
|
||||
|
||||
expect(template.trimEnd().endsWith("$ARGUMENTS$")).toBe(true);
|
||||
expect(template.trimEnd().endsWith("$ARGUMENTS")).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -210,7 +210,7 @@ describe("CompactionPromptPlugin config hook", () => {
|
||||
"## Discard",
|
||||
);
|
||||
expect(cfg.command?.["plugin-compaction-init"].template).toContain(
|
||||
"$ARGUMENTS$",
|
||||
"$ARGUMENTS",
|
||||
);
|
||||
expect(context.logs).toHaveLength(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user