@rantingjs/studio 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -45,9 +45,10 @@ through the app (`/ranting-studio/api/opencode/*`), which adds the password, so
45
45
  thinks before it answers, `low` to `max`) is always a level the model has: `high` to start, then the last chosen
46
46
  for that model. Both are kept on the conversation.
47
47
  - **Providers**: the gear (or "Manage providers" in the picker) shows what is connected and how, popular providers
48
- to add, and a search over all of them. A provider opens on its own with its ways to connect: a sign-in to a
49
- subscription, this machine's login (Claude Code's), an API key, or the environment variable to set. OpenCode keeps
50
- them in your user profile, for every project; its free models need none.
48
+ to add, and a search over all of them. A provider opens on its own with its ways to connect: an API key, a sign-in
49
+ on the provider's page, or the environment variable to set. OpenCode keeps them in your user profile, for every
50
+ project; its free models need none. Claude comes through an Anthropic API key (Claude Console), or a cloud provider
51
+ (Amazon Bedrock, Google Cloud, Microsoft Foundry), as Anthropic asks of tools other than its own.
51
52
  - **Undo**: "Undo this turn" under the last answer (or above the agent's last turn in Changes) hides your last
52
53
  message and what came of it, and puts back the files it changed; your message goes back in the box. "Redo" brings
53
54
  both back, until a new message makes the undo final.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rantingjs/studio",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A browser panel beside a local ranting app: a coding agent (OpenCode) to chat with per project, a live preview, the agent's changes and the last exception",
5
5
  "type": "module",
6
6
  "exports": {
package/ui/app.tsx CHANGED
@@ -262,7 +262,7 @@ function App() {
262
262
  const loadModels = () => {
263
263
  client.model
264
264
  .list({ location: location_ })
265
- // Chat models: those typed so, and those of providers that give no type (Claude Agent's).
265
+ // Chat models: those typed so, and those of providers that give no type.
266
266
  .then((result) => setModels(result.data.filter((entry) => (entry.type ?? 'chat') === 'chat' && entry.enabled && entry.status !== 'deprecated')))
267
267
  .catch(() => undefined);
268
268
  client.model
@@ -11,7 +11,7 @@ import { Popover, useListKeys } from './popover.js';
11
11
  const free = (model: ModelInfo) => model.cost.length > 0 && model.cost.every((cost) => !cost.input && !cost.output);
12
12
 
13
13
  /** What a provider's group says under its name. */
14
- const providerNote = (providerID: string, models: ModelInfo[]) => (providerID === 'claude-agent' ? 'your Claude subscription' : models.every(free) ? 'free' : '');
14
+ const providerNote = (models: ModelInfo[]) => (models.every(free) ? 'free' : '');
15
15
 
16
16
  export function ModelPicker({
17
17
  models,
@@ -34,8 +34,8 @@ export function ModelPicker({
34
34
  const [query, setQuery] = useState('');
35
35
  const term = query.trim().toLowerCase();
36
36
  const shown = models.filter((entry) => !term || `${entry.name} ${entry.modelID} ${providerNames[entry.providerID] ?? entry.providerID}`.toLowerCase().includes(term));
37
- // A subscription's models first, the free ones last, the rest by name.
38
- const order = (providerID: string) => (providerID === 'claude-agent' ? 0 : shown.filter((entry) => entry.providerID === providerID).every(free) ? 2 : 1);
37
+ // By name, the free ones last.
38
+ const order = (providerID: string) => (shown.filter((entry) => entry.providerID === providerID).every(free) ? 1 : 0);
39
39
  const groups = [...new Set(shown.map((entry) => entry.providerID))].sort((a, b) => order(a) - order(b) || a.localeCompare(b));
40
40
  const flat = groups.flatMap((providerID) => shown.filter((entry) => entry.providerID === providerID));
41
41
  const pick = (entry: ModelInfo) => {
@@ -63,7 +63,7 @@ export function ModelPicker({
63
63
  <div class="list-group">
64
64
  <div class="list-group-title">
65
65
  {providerNames[providerID] ?? providerID}
66
- {providerNote(providerID, models.filter((entry) => entry.providerID === providerID)) && <span> · {providerNote(providerID, models.filter((entry) => entry.providerID === providerID))}</span>}
66
+ {providerNote(models.filter((entry) => entry.providerID === providerID)) && <span> · {providerNote(models.filter((entry) => entry.providerID === providerID))}</span>}
67
67
  </div>
68
68
  {shown
69
69
  .filter((entry) => entry.providerID === providerID)
package/ui/providers.tsx CHANGED
@@ -6,10 +6,12 @@ import { useEffect, useState } from 'hono/jsx/dom';
6
6
  import { Icon } from './icons.js';
7
7
  import { client, errorText, location_, waitForSignIn } from './shared.js';
8
8
 
9
- /** The ones most people use, with what each gives; OpenCode lists every provider without telling. */
9
+ /**
10
+ * The ones most people use, with what each gives; OpenCode lists every provider without telling. Claude is offered
11
+ * through an Anthropic API key, the way Anthropic asks of third-party tools; others stay in the search over all.
12
+ */
10
13
  const POPULAR: [id: string, note: string][] = [
11
- ['claude-agent', 'Your Claude subscription, through Claude Code’s login'],
12
- ['anthropic', 'Claude models with an API key'],
14
+ ['anthropic', 'Claude models with an API key (Claude Console)'],
13
15
  ['openai', 'GPT models: ChatGPT sign-in or an API key'],
14
16
  ['github-copilot', 'Your GitHub Copilot subscription'],
15
17
  ['google', 'Gemini models with an API key'],