mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 02:01:29 +00:00
refactor(coding-agent): unify SkillWarning and ResourceDiagnostic
- Create shared diagnostics.ts with ResourceCollision and ResourceDiagnostic types - Update loadSkills() to return diagnostics instead of warnings - Remove SkillWarning type and skillWarningsToDiagnostics() conversion - Update skills.test.ts to use diagnostics
This commit is contained in:
parent
6d0d434d8c
commit
4719929f6a
5 changed files with 95 additions and 111 deletions
15
packages/coding-agent/src/core/diagnostics.ts
Normal file
15
packages/coding-agent/src/core/diagnostics.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export interface ResourceCollision {
|
||||
resourceType: "extension" | "skill" | "prompt" | "theme";
|
||||
name: string; // skill name, command/tool/flag name, prompt name, theme name
|
||||
winnerPath: string;
|
||||
loserPath: string;
|
||||
winnerSource?: string; // e.g., "npm:foo", "git:...", "local"
|
||||
loserSource?: string;
|
||||
}
|
||||
|
||||
export interface ResourceDiagnostic {
|
||||
type: "warning" | "error" | "collision";
|
||||
message: string;
|
||||
path?: string;
|
||||
collision?: ResourceCollision;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue