thebird 1.2.93 → 1.2.94
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.
- package/docs/app.js +5 -4
- package/docs/chat-providers.js +1 -0
- package/package.json +1 -1
package/docs/app.js
CHANGED
|
@@ -66,14 +66,15 @@ class BirdChat extends HTMLElement {
|
|
|
66
66
|
|
|
67
67
|
renderBaseUrlInput() {
|
|
68
68
|
const { providerType, baseUrl } = this.state;
|
|
69
|
-
if (providerType !== 'custom' && providerType !== 'kilo' && providerType !== 'opencode') return null;
|
|
70
|
-
const
|
|
69
|
+
if (providerType !== 'custom' && providerType !== 'kilo' && providerType !== 'opencode' && providerType !== 'acp2openai') return null;
|
|
70
|
+
const phMap = { kilo: 'http://localhost:4780', opencode: 'http://localhost:4790', acp2openai: 'http://localhost:4800/v1', custom: 'https://your-endpoint/v1' };
|
|
71
|
+
const ph = phMap[providerType] || phMap.custom;
|
|
71
72
|
return html`<input type="text" class="tui-input" style="flex:1;min-width:140px" placeholder=${ph} value=${baseUrl}
|
|
72
73
|
onchange=${e => { localStorage.setItem('provider_base_url', e.target.value); this.setState({ baseUrl: e.target.value }); }} />`;
|
|
73
74
|
}
|
|
74
75
|
renderApiKeyInput() {
|
|
75
76
|
const { providerType, apiKey } = this.state;
|
|
76
|
-
if (providerType === 'kilo' || providerType === 'opencode') return null;
|
|
77
|
+
if (providerType === 'kilo' || providerType === 'opencode' || providerType === 'acp2openai') return null;
|
|
77
78
|
const provDef = PROVIDERS[providerType] || PROVIDERS.custom;
|
|
78
79
|
return html`<input id="api-key-input" type="password" class="tui-input" style="flex:1;min-width:120px" placeholder=${provDef.keyPlaceholder} value=${apiKey}
|
|
79
80
|
onchange=${e => { const v = e.target.value.trim(); localStorage.setItem('provider_api_key', v); this.setState({ apiKey: v }); if (v) this.loadModels(); }} />`;
|
|
@@ -128,7 +129,7 @@ class BirdChat extends HTMLElement {
|
|
|
128
129
|
const text = input?.value.trim();
|
|
129
130
|
if (!text || this.state.streaming) return;
|
|
130
131
|
const { apiKey, model, providerType, baseUrl } = this.state;
|
|
131
|
-
if (!apiKey && providerType !== 'kilo' && providerType !== 'opencode') { this.setState({ status: 'Enter an API key above.' }); return; }
|
|
132
|
+
if (!apiKey && providerType !== 'kilo' && providerType !== 'opencode' && providerType !== 'acp2openai') { this.setState({ status: 'Enter an API key above.' }); return; }
|
|
132
133
|
input.value = '';
|
|
133
134
|
input.style.height = 'auto';
|
|
134
135
|
const normalizedMessages = [...this.state.messages, { role: 'user', content: text }].map(m => ({
|
package/docs/chat-providers.js
CHANGED
|
@@ -8,6 +8,7 @@ export const PROVIDERS = {
|
|
|
8
8
|
cerebras: { label: 'Cerebras', baseUrl: 'https://api.cerebras.ai/v1', keyPlaceholder: 'CEREBRAS_API_KEY', models: ['gpt-oss-120b', 'llama3.1-8b'] },
|
|
9
9
|
kilo: { label: 'Kilo Code', baseUrl: 'http://localhost:4780', keyPlaceholder: '(no key needed)', models: ['x-ai/grok-code-fast-1:optimized:free', 'kilo-auto/free', 'openrouter/free', 'stepfun/step-3.5-flash:free', 'nvidia/nemotron-3-super-120b-a12b:free', 'bytedance-seed/dola-seed-2.0-pro:free'] },
|
|
10
10
|
opencode: { label: 'opencode (zen)', baseUrl: 'http://localhost:4790', keyPlaceholder: '(needs opencode auth login)', models: ['minimax-m2.5-free', 'nemotron-3-super-free'] },
|
|
11
|
+
acp2openai: { label: 'acp2openai (OpenAI-compat)', baseUrl: 'http://localhost:4800/v1', keyPlaceholder: '(no key needed)', models: ['kilo/x-ai/grok-code-fast-1:optimized:free', 'kilo/kilo-auto/free', 'kilo/openrouter/free', 'opencode/minimax-m2.5-free'] },
|
|
11
12
|
custom: { label: 'Custom (OpenAI-compat)', baseUrl: '', keyPlaceholder: 'API_KEY', models: [] },
|
|
12
13
|
};
|
|
13
14
|
|
package/package.json
CHANGED