rird 1.1.5 → 1.1.6

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/rird CHANGED
@@ -280,6 +280,7 @@ if (command === "activate") {
280
280
  // FALLBACK: If binary not found, try to run from source if in dev tree
281
281
  const sourceIndex = path.join(scriptDir, "..", "src", "index.ts")
282
282
  if (fs.existsSync(sourceIndex)) {
283
+ const args = process.argv.slice(2)
283
284
  childProcess.spawnSync("bun", ["run", "--conditions=browser", sourceIndex, ...args], {
284
285
  stdio: "inherit",
285
286
  env: env,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "name": "rird",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -977,7 +977,7 @@ export function Prompt(props: PromptProps) {
977
977
  theme.backgroundElement.a !== 0
978
978
  ? {
979
979
  ...EmptyBorder,
980
- horizontal: "",
980
+ horizontal: "^",
981
981
  }
982
982
  : {
983
983
  ...EmptyBorder,
@@ -69,7 +69,9 @@ export function Sidebar(props: { sessionID: string }) {
69
69
  const gettingStartedDismissed = createMemo(() => kv.get("dismissed_getting_started", false))
70
70
 
71
71
  return (
72
+ <>
72
73
  <Show when={session()}>
74
+ <>
73
75
  <box
74
76
  backgroundColor={theme.backgroundPanel}
75
77
  width={42}
@@ -132,7 +134,11 @@ export function Sidebar(props: { sessionID: string }) {
132
134
  needs_auth: theme.warning,
133
135
  needs_client_registration: theme.error,
134
136
  } as Record<string, typeof theme.success>
135
- * </text>
137
+ )[item.status],
138
+ }}
139
+ >
140
+ *
141
+ </text>
136
142
  <text fg={theme.text} wrapMode="word">
137
143
  {key}{" "}
138
144
  <span style={{ fg: theme.textMuted }}>
@@ -274,7 +280,7 @@ export function Sidebar(props: { sessionID: string }) {
274
280
  gap={1}
275
281
  >
276
282
  <text flexShrink={0} fg={theme.text}>
277
-
283
+ *
278
284
  </text>
279
285
  <box flexGrow={1} gap={1}>
280
286
  <box flexDirection="row" justifyContent="space-between">
@@ -282,7 +288,7 @@ export function Sidebar(props: { sessionID: string }) {
282
288
  <b>Getting started</b>
283
289
  </text>
284
290
  <text fg={theme.textMuted} onMouseDown={() => kv.set("dismissed_getting_started", true)}>
285
-
291
+ x
286
292
  </text>
287
293
  </box>
288
294
  <text fg={theme.textMuted}>RIRD utilizes advanced research tools to ensure high-fidelity data retrieval.</text>
@@ -309,6 +315,8 @@ export function Sidebar(props: { sessionID: string }) {
309
315
  </text>
310
316
  </box>
311
317
  </box>
318
+ </>
312
319
  </Show>
320
+ </>
313
321
  )
314
322
  }
package/src/cli/error.ts CHANGED
@@ -4,7 +4,20 @@ import { MCP } from "../mcp"
4
4
  import { Provider } from "../provider/provider"
5
5
  import { UI } from "./ui"
6
6
 
7
- export function FormatError(input: unknown) {
7
+ import type { NamedError } from "@opencode-ai/util/error"
8
+
9
+ export type ErrorTypes =
10
+ | typeof MCP.Failed
11
+ | typeof Provider.ModelNotFoundError
12
+ | typeof Provider.InitError
13
+ | typeof Config.JsonError
14
+ | typeof Config.ConfigDirectoryTypoError
15
+ | typeof ConfigMarkdown.FrontmatterError
16
+ | typeof Config.InvalidError
17
+ | typeof UI.CancelledError
18
+ | NamedError
19
+
20
+ export function FormatError(input: ErrorTypes) {
8
21
  if (MCP.Failed.isInstance(input))
9
22
  return `MCP server "${input.data.name}" failed. Note, RIRD does not support MCP authentication yet.`
10
23
  if (Provider.ModelNotFoundError.isInstance(input)) {
@@ -34,7 +47,7 @@ export function FormatError(input: unknown) {
34
47
  return [
35
48
  `Configuration is invalid${input.data.path && input.data.path !== "config" ? ` at ${input.data.path}` : ""}` +
36
49
  (input.data.message ? `: ${input.data.message}` : ""),
37
- ...(input.data.issues?.map((issue) => " " + issue.message + " " + issue.path.join(".")) ?? []),
50
+ ...(input.data.issues?.map((issue) => "-> " + issue.message + " " + issue.path.join(".")) ?? []),
38
51
  ].join("\n")
39
52
 
40
53
  if (UI.CancelledError.isInstance(input)) return ""
package/src/cli/ui.ts CHANGED
@@ -19,7 +19,7 @@ export namespace UI {
19
19
  [``, ``],
20
20
  [`_^^_ ### #^# #^#_ _^^^ _^^_ ### #^# `, ``],
21
21
  [`#..# ##^# #^# #..# #... #..# #..# #^# `, ``],
22
- `^__^ #..# ^^^ ^..^ ^^^^ ^__^ ^^^^ ^^^ `, `rird.ai`],
22
+ [`^__^ #..# ^^^ ^..^ ^^^^ ^__^ ^^^^ ^^^ `, `rird.ai`],
23
23
  ]
24
24
 
25
25
  export const CancelledError = NamedError.create("UICancelledError", z.void())
@@ -9,7 +9,7 @@ import { mergeDeep, pipe, unique } from "remeda"
9
9
  import { Global } from "../global"
10
10
  import fs from "fs/promises"
11
11
  import { lazy } from "../util/lazy"
12
- import { NamedError } from "@rird.ai/util/error"
12
+ import { NamedError } from "@opencode-ai/util/error"
13
13
  import { Flag } from "../flag/flag"
14
14
  import { Auth } from "../auth"
15
15
  import { type ParseError as JsoncParseError, parse as parseJsonc, printParseErrorCode } from "jsonc-parser"
package/src/index.ts CHANGED
@@ -11,7 +11,7 @@ import { ModelsCommand } from "./cli/cmd/models"
11
11
  import { UI } from "./cli/ui"
12
12
  import { Installation } from "./installation"
13
13
  import { NamedError } from "@opencode-ai/util/error"
14
- import { FormatError } from "./cli/error"
14
+ import { FormatError, type ErrorTypes } from "./cli/error"
15
15
  import { ServeCommand } from "./cli/cmd/serve"
16
16
  import { DebugCommand } from "./cli/cmd/debug"
17
17
  import { StatsCommand } from "./cli/cmd/stats"
@@ -235,7 +235,7 @@ try {
235
235
  })
236
236
  }
237
237
  Log.Default.error("fatal", data)
238
- const formatted = FormatError(e)
238
+ const formatted = FormatError(e as ErrorTypes)
239
239
  if (formatted) UI.error(formatted)
240
240
  if (formatted === undefined) {
241
241
  UI.error("Unexpected error, check log file at " + Log.file() + " for more details" + EOL)