@springbrand/message-panel 0.2.0-alpha.53 → 0.2.0-alpha.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { Diamond, X } from "@phosphor-icons/react";
2
2
 
3
3
  export interface CapabilityChipProps {
4
- kind: "skill" | "tool" | "plan";
4
+ kind: "skill" | "tool" | "plan" | "plugin";
5
5
  label: string;
6
6
  removable?: boolean;
7
7
  onRemove?: () => void;
@@ -35,7 +35,7 @@ export interface CloudOsMessageMetadata extends UnknownRecord {
35
35
  }
36
36
 
37
37
  export interface CloudOsRequestedCapability {
38
- kind: "skill" | "tool" | "plan";
38
+ kind: "skill" | "tool" | "plan" | "plugin";
39
39
  name: string;
40
40
  label: string;
41
41
  }
@@ -194,12 +194,17 @@ export function requestedCapabilitiesOf(
194
194
  typeof capability.label !== "string" ||
195
195
  !capability.label.trim()
196
196
  ) return [];
197
- const key = `${capability.kind}:${capability.name}`;
197
+ const resourceId = typeof capability.resourceId === "string"
198
+ ? capability.resourceId.trim()
199
+ : "";
200
+ const kind = resourceId ? "plugin" : capability.kind;
201
+ const name = resourceId || capability.name;
202
+ const key = `${kind}:${name}`;
198
203
  if (seen.has(key)) return [];
199
204
  seen.add(key);
200
205
  return [{
201
- kind: capability.kind,
202
- name: capability.name,
206
+ kind,
207
+ name,
203
208
  label: capability.label,
204
209
  }];
205
210
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/message-panel",
3
- "version": "0.2.0-alpha.53",
3
+ "version": "0.2.0-alpha.55",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",