@chrysb/alphaclaw 0.1.24 → 0.1.25

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.
@@ -55,8 +55,7 @@ export const Features = ({ onSwitchTab }) => {
55
55
  <${Badge} tone="success">Enabled</${Badge}>
56
56
  </span>
57
57
  `
58
- : feature.hasDefault
59
- ? html`
58
+ : html`
60
59
  <span class="flex items-center gap-2">
61
60
  <a
62
61
  href="#"
@@ -66,20 +65,7 @@ export const Features = ({ onSwitchTab }) => {
66
65
  }}
67
66
  class="text-xs text-gray-500 hover:text-gray-300"
68
67
  >Add provider</a>
69
- <${Badge} tone="success">Default</${Badge}>
70
- </span>
71
- `
72
- : html`
73
- <span class="flex items-center gap-2">
74
- <a
75
- href="#"
76
- onclick=${(e) => {
77
- e.preventDefault();
78
- onSwitchTab?.("providers");
79
- }}
80
- class="text-xs text-gray-500 hover:text-gray-300"
81
- >Add provider</a>
82
- <${Badge} tone="danger">Disabled</${Badge}>
68
+ <${Badge} tone=${feature.hasDefault ? "neutral" : "danger"}>Disabled</${Badge}>
83
69
  </span>
84
70
  `}
85
71
  </div>
@@ -23,6 +23,7 @@ import {
23
23
  kProviderLabels,
24
24
  kProviderOrder,
25
25
  kProviderFeatures,
26
+ kCoreProviders,
26
27
  } from "../lib/model-config.js";
27
28
 
28
29
  const html = htm.bind(h);
@@ -70,6 +71,7 @@ export const Providers = () => {
70
71
  const [savedAiValues, setSavedAiValues] = useState(() => kProvidersTabCache?.savedAiValues || {});
71
72
  const [restartRequired, setRestartRequired] = useState(false);
72
73
  const [restartingGateway, setRestartingGateway] = useState(false);
74
+ const [showMoreProviders, setShowMoreProviders] = useState(false);
73
75
  const codexPopupPollRef = useRef(null);
74
76
 
75
77
  const refresh = async () => {
@@ -490,7 +492,27 @@ export const Providers = () => {
490
492
  </div>
491
493
  </div>
492
494
 
493
- ${otherProviders.map((provider) => renderProviderCard(provider))}
495
+ ${otherProviders
496
+ .filter((p) => kCoreProviders.has(p))
497
+ .map((provider) => renderProviderCard(provider))}
498
+
499
+ ${showMoreProviders
500
+ ? otherProviders
501
+ .filter((p) => !kCoreProviders.has(p))
502
+ .map((provider) => renderProviderCard(provider))
503
+ : null}
504
+
505
+ ${otherProviders.some((p) => !kCoreProviders.has(p))
506
+ ? html`
507
+ <button
508
+ type="button"
509
+ onclick=${() => setShowMoreProviders((prev) => !prev)}
510
+ class="w-full text-xs text-gray-500 hover:text-gray-300 py-1"
511
+ >
512
+ ${showMoreProviders ? "Hide additional providers" : "More providers"}
513
+ </button>
514
+ `
515
+ : null}
494
516
 
495
517
  ${restartRequired
496
518
  ? html`<div
@@ -134,6 +134,8 @@ export const kProviderOrder = [
134
134
  "deepgram",
135
135
  ];
136
136
 
137
+ export const kCoreProviders = new Set(["anthropic", "openai", "google"]);
138
+
137
139
  export const kProviderFeatures = {
138
140
  anthropic: ["Agent Model"],
139
141
  openai: ["Agent Model", "Embeddings", "Audio"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrysb/alphaclaw",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },