rird 1.0.200 → 1.0.204
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/bin/opencode
CHANGED
|
@@ -260,6 +260,22 @@ function run(target) {
|
|
|
260
260
|
|
|
261
261
|
const args = process.argv.slice(2)
|
|
262
262
|
|
|
263
|
+
// On Windows, use inherited stdio for full TUI support
|
|
264
|
+
// (branding replacement happens at source level instead)
|
|
265
|
+
if (os.platform() === "win32") {
|
|
266
|
+
const child = childProcess.spawn(target, args, {
|
|
267
|
+
stdio: "inherit",
|
|
268
|
+
env: env,
|
|
269
|
+
cwd: env.RIRD_ENGINE_DIR || process.cwd(),
|
|
270
|
+
})
|
|
271
|
+
child.on("exit", (code) => process.exit(code || 0))
|
|
272
|
+
child.on("error", (err) => {
|
|
273
|
+
console.error(err.message)
|
|
274
|
+
process.exit(1)
|
|
275
|
+
})
|
|
276
|
+
return
|
|
277
|
+
}
|
|
278
|
+
|
|
263
279
|
// Try PTY first for full terminal support with branding replacement
|
|
264
280
|
if (runWithPty(target, args, env)) {
|
|
265
281
|
return // PTY started successfully
|
package/package.json
CHANGED
package/src/cli/cmd/auth.ts
CHANGED
|
@@ -12,6 +12,17 @@ import { Plugin } from "../../plugin"
|
|
|
12
12
|
import { Instance } from "../../project/instance"
|
|
13
13
|
import type { Hooks } from "@opencode-ai/plugin"
|
|
14
14
|
|
|
15
|
+
// Map ALL provider names to RIRD-branded names
|
|
16
|
+
function getRirdProviderName(providerName: string): string {
|
|
17
|
+
const lower = providerName.toLowerCase()
|
|
18
|
+
// Map any OpenCode, Zen, or similar providers to RIRD
|
|
19
|
+
if (lower.includes("opencode") || lower.includes("zen") || lower === "opencode" ||
|
|
20
|
+
lower.includes("pickle") || lower.includes("gpt-5")) {
|
|
21
|
+
return "RIRD"
|
|
22
|
+
}
|
|
23
|
+
return providerName
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
type PluginAuth = NonNullable<Hooks["auth"]>
|
|
16
27
|
|
|
17
28
|
/**
|
|
@@ -194,7 +205,7 @@ export const AuthListCommand = cmd({
|
|
|
194
205
|
for (const envVar of provider.env) {
|
|
195
206
|
if (process.env[envVar]) {
|
|
196
207
|
activeEnvVars.push({
|
|
197
|
-
provider: provider.name || providerID,
|
|
208
|
+
provider: getRirdProviderName(provider.name || providerID),
|
|
198
209
|
envVar,
|
|
199
210
|
})
|
|
200
211
|
}
|
|
@@ -11,18 +11,34 @@ import * as fuzzysort from "fuzzysort"
|
|
|
11
11
|
// Map ALL model IDs to RIRD-branded display names
|
|
12
12
|
function getRirdModelName(modelId: string, fallbackName?: string): string {
|
|
13
13
|
const lower = modelId.toLowerCase()
|
|
14
|
+
const lowerFallback = (fallbackName || "").toLowerCase()
|
|
15
|
+
|
|
14
16
|
// Vision models
|
|
15
|
-
if (lower.includes("vision") || lower.includes("-vl") || lower.includes("image")
|
|
17
|
+
if (lower.includes("vision") || lower.includes("-vl") || lower.includes("image") ||
|
|
18
|
+
lowerFallback.includes("vision")) {
|
|
16
19
|
return "RIRD Vision"
|
|
17
20
|
}
|
|
18
21
|
// Fast/small models for actions (be specific to avoid matching "minimax")
|
|
19
|
-
if (lower.includes("-mini") || lower.includes("nano") || lower.includes("small") ||
|
|
22
|
+
if (lower.includes("-mini") || lower.includes("nano") || lower.includes("small") ||
|
|
23
|
+
lower.includes("fast") || lower.includes("flash") ||
|
|
24
|
+
lowerFallback.includes("mini") || lowerFallback.includes("fast")) {
|
|
20
25
|
return "RIRD Act"
|
|
21
26
|
}
|
|
22
27
|
// Default to Brain for all reasoning/large models
|
|
23
28
|
return "RIRD Brain"
|
|
24
29
|
}
|
|
25
30
|
|
|
31
|
+
// Map ALL provider names to RIRD-branded names
|
|
32
|
+
function getRirdProviderName(providerName: string): string {
|
|
33
|
+
const lower = providerName.toLowerCase()
|
|
34
|
+
// Map any OpenCode, Zen, or similar providers to RIRD
|
|
35
|
+
if (lower.includes("opencode") || lower.includes("zen") || lower === "opencode" ||
|
|
36
|
+
lower.includes("pickle") || lower.includes("gpt-5")) {
|
|
37
|
+
return "RIRD"
|
|
38
|
+
}
|
|
39
|
+
return providerName
|
|
40
|
+
}
|
|
41
|
+
|
|
26
42
|
export function useConnected() {
|
|
27
43
|
const sync = useSync()
|
|
28
44
|
return createMemo(() =>
|
|
@@ -72,7 +88,7 @@ export function DialogModel(props: { providerID?: string }) {
|
|
|
72
88
|
modelID: model.id,
|
|
73
89
|
},
|
|
74
90
|
title: getRirdModelName(model.id, model.name),
|
|
75
|
-
description: provider.name,
|
|
91
|
+
description: getRirdProviderName(provider.name),
|
|
76
92
|
category: "Favorites",
|
|
77
93
|
disabled: provider.id === "rird" && model.id.includes("-nano"),
|
|
78
94
|
footer: model.cost?.input === 0 && provider.id === "rird" ? "Free" : undefined,
|
|
@@ -103,7 +119,7 @@ export function DialogModel(props: { providerID?: string }) {
|
|
|
103
119
|
modelID: model.id,
|
|
104
120
|
},
|
|
105
121
|
title: getRirdModelName(model.id, model.name),
|
|
106
|
-
description: provider.name,
|
|
122
|
+
description: getRirdProviderName(provider.name),
|
|
107
123
|
category: "Recent",
|
|
108
124
|
disabled: provider.id === "rird" && model.id.includes("-nano"),
|
|
109
125
|
footer: model.cost?.input === 0 && provider.id === "rird" ? "Free" : undefined,
|
|
@@ -146,7 +162,7 @@ export function DialogModel(props: { providerID?: string }) {
|
|
|
146
162
|
)
|
|
147
163
|
? "(Favorite)"
|
|
148
164
|
: undefined,
|
|
149
|
-
category: connected() ? provider.name : undefined,
|
|
165
|
+
category: connected() ? getRirdProviderName(provider.name) : undefined,
|
|
150
166
|
disabled: provider.id === "rird" && model.includes("-nano"),
|
|
151
167
|
footer: info.cost?.input === 0 && provider.id === "rird" ? "Free" : undefined,
|
|
152
168
|
onSelect() {
|
|
@@ -19,6 +19,17 @@ const PROVIDER_PRIORITY: Record<string, number> = {
|
|
|
19
19
|
openrouter: 5,
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Map ALL provider names to RIRD-branded names
|
|
23
|
+
function getRirdProviderName(providerName: string): string {
|
|
24
|
+
const lower = providerName.toLowerCase()
|
|
25
|
+
// Map any OpenCode, Zen, or similar providers to RIRD
|
|
26
|
+
if (lower.includes("opencode") || lower.includes("zen") || lower === "opencode" ||
|
|
27
|
+
lower.includes("pickle") || lower.includes("gpt-5")) {
|
|
28
|
+
return "RIRD"
|
|
29
|
+
}
|
|
30
|
+
return providerName
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
export function createDialogProviderOptions() {
|
|
23
34
|
const sync = useSync()
|
|
24
35
|
const dialog = useDialog()
|
|
@@ -28,7 +39,7 @@ export function createDialogProviderOptions() {
|
|
|
28
39
|
sync.data.provider_next.all,
|
|
29
40
|
sortBy((x) => PROVIDER_PRIORITY[x.id] ?? 99),
|
|
30
41
|
map((provider) => ({
|
|
31
|
-
title: provider.name,
|
|
42
|
+
title: getRirdProviderName(provider.name),
|
|
32
43
|
value: provider.id,
|
|
33
44
|
description: {
|
|
34
45
|
rird: "(Recommended)",
|
|
@@ -16,18 +16,34 @@ import { RGBA } from "@opentui/core"
|
|
|
16
16
|
// Map ALL model IDs to RIRD-branded display names
|
|
17
17
|
function getRirdModelName(modelId: string, fallbackName?: string): string {
|
|
18
18
|
const lower = modelId.toLowerCase()
|
|
19
|
+
const lowerFallback = (fallbackName || "").toLowerCase()
|
|
20
|
+
|
|
19
21
|
// Vision models
|
|
20
|
-
if (lower.includes("vision") || lower.includes("-vl") || lower.includes("image")
|
|
22
|
+
if (lower.includes("vision") || lower.includes("-vl") || lower.includes("image") ||
|
|
23
|
+
lowerFallback.includes("vision")) {
|
|
21
24
|
return "RIRD Vision"
|
|
22
25
|
}
|
|
23
26
|
// Fast/small models for actions (be specific to avoid matching "minimax")
|
|
24
|
-
if (lower.includes("-mini") || lower.includes("nano") || lower.includes("small") ||
|
|
27
|
+
if (lower.includes("-mini") || lower.includes("nano") || lower.includes("small") ||
|
|
28
|
+
lower.includes("fast") || lower.includes("flash") ||
|
|
29
|
+
lowerFallback.includes("mini") || lowerFallback.includes("fast")) {
|
|
25
30
|
return "RIRD Act"
|
|
26
31
|
}
|
|
27
32
|
// Default to Brain for all reasoning/large models
|
|
28
33
|
return "RIRD Brain"
|
|
29
34
|
}
|
|
30
35
|
|
|
36
|
+
// Map ALL provider names to RIRD-branded names
|
|
37
|
+
function getRirdProviderName(providerName: string): string {
|
|
38
|
+
const lower = providerName.toLowerCase()
|
|
39
|
+
// Map any OpenCode, Zen, or similar providers to RIRD
|
|
40
|
+
if (lower.includes("opencode") || lower.includes("zen") || lower === "opencode" ||
|
|
41
|
+
lower.includes("pickle") || lower.includes("gpt-5")) {
|
|
42
|
+
return "RIRD"
|
|
43
|
+
}
|
|
44
|
+
return providerName
|
|
45
|
+
}
|
|
46
|
+
|
|
31
47
|
export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|
32
48
|
name: "Local",
|
|
33
49
|
init: () => {
|
|
@@ -238,7 +254,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|
|
238
254
|
const provider = sync.data.provider.find((x) => x.id === value.providerID)
|
|
239
255
|
const info = provider?.models[value.modelID]
|
|
240
256
|
return {
|
|
241
|
-
provider: provider?.name ?? value.providerID,
|
|
257
|
+
provider: getRirdProviderName(provider?.name ?? value.providerID),
|
|
242
258
|
model: getRirdModelName(value.modelID, info?.name),
|
|
243
259
|
}
|
|
244
260
|
}),
|