mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-18 18:04:26 +00:00
fix(agents): getAllAdapters returns correct agent types
Fixed getAllAdapters() to return the correct agent type from the record keys instead of relying on adapter.type property, which was returning 'universal' for all UniversalAdapter instances. This fixes the E2E test that checks for all 32 agents in init --list output (cline, codebuddy, commandcode, etc. were showing as 'universal').
This commit is contained in:
@@ -81,8 +81,16 @@ export function getAdapter(type: AgentType): AgentAdapter {
|
||||
return adapters[type];
|
||||
}
|
||||
|
||||
export function getAllAdapters(): AgentAdapter[] {
|
||||
return Object.values(adapters);
|
||||
export interface AgentAdapterWithType extends AgentAdapter {
|
||||
readonly agentType: AgentType;
|
||||
}
|
||||
|
||||
export function getAllAdapters(): AgentAdapterWithType[] {
|
||||
return Object.entries(adapters).map(([type, adapter]) => ({
|
||||
...adapter,
|
||||
type: type as AgentType,
|
||||
agentType: type as AgentType,
|
||||
}));
|
||||
}
|
||||
|
||||
export async function detectAgent(): Promise<AgentType> {
|
||||
|
||||
Reference in New Issue
Block a user