mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Add the agent-less setup page, a shared agent list and the split Agents & models tab
AI Assisted
This commit is contained in:
1 parent
c122332657
commit
33f1783979
55 files changed
+5453
-1345
No files matched your search
@@ -47,6 +47,22 @@ export function pickDefaultAgent(availability, remembered) {
|
||||
return list.length > 0 ? list[0].id : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The one-line notice for the launch card when the remembered agent is gone
|
||||
* but another works (FR-13): the id the card picks instead, or null when the
|
||||
* remembered one still runs or nothing else does.
|
||||
*/
|
||||
export function lastAgentNotice(list, remembered) {
|
||||
const entries = Array.isArray(list) ? list : [];
|
||||
if (!remembered) return null;
|
||||
const hit = entries.find((a) => a.id === remembered);
|
||||
if (hit && hit.installed) return null;
|
||||
const using = pickDefaultAgent(entries, remembered);
|
||||
if (!using || using === remembered) return null;
|
||||
const usingEntry = entries.find((a) => a.id === using);
|
||||
return usingEntry && usingEntry.installed ? using : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* What the right end of the bar offers, most pressing first: the bar shows
|
||||
* the first step (short text plus its one button) and counts the rest as
|
||||
|
||||
Reference in new issue
Block a user