feat: the composer reads agent profiles from composer-agents.json
Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
1 parent
1b12550d04
commit
dc5dcc9cc6
5 files changed
+183
-30
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
commands,
|
||||
globalCommands,
|
||||
historyCommands,
|
||||
menuNotes,
|
||||
} from "../herdr/herdr-composer/mods/herdr-composer/catalog.js";
|
||||
import {
|
||||
DEFAULT_PROFILES,
|
||||
@@ -433,3 +434,25 @@ test("commands: a history command that is a builtin shows once, as Wbudowane", a
|
||||
test("GROUPS has Z historii right after Pluginy", () => {
|
||||
assert.equal(GROUPS[GROUPS.indexOf("Pluginy") + 1], "Z historii");
|
||||
});
|
||||
|
||||
test("menuNotes: an unknown agent names the key, but only once the file was read", () => {
|
||||
const loaded = menuNotes({ profile: null, agent: "kiro-cli", profilesLoaded: true, problem: null });
|
||||
assert.equal(loaded.length, 1);
|
||||
assert.ok(loaded[0].includes("`kiro-cli`"));
|
||||
assert.ok(loaded[0].includes("composer-agents.json"));
|
||||
assert.deepEqual(menuNotes({ profile: null, agent: "kiro-cli", profilesLoaded: false, problem: null }), []);
|
||||
});
|
||||
|
||||
test("menuNotes: a problem with the file is one row", () => {
|
||||
assert.deepEqual(
|
||||
menuNotes({ profile: CC_PROFILE, agent: "claude", profilesLoaded: true, problem: "nieczytelny JSON" }),
|
||||
["`composer-agents.json`: nieczytelny JSON"],
|
||||
);
|
||||
});
|
||||
|
||||
test("menuNotes: unknown agent first, then the problem", () => {
|
||||
const notes = menuNotes({ profile: null, agent: "kiro-cli", profilesLoaded: true, problem: "brak listy agents" });
|
||||
assert.equal(notes.length, 2);
|
||||
assert.ok(notes[0].startsWith("Nieznany agent"));
|
||||
assert.equal(notes[1], "`composer-agents.json`: brak listy agents");
|
||||
});
|
||||
Reference in new issue
Block a user