reigncode-app 1.3.2 → 1.4.0

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.
Files changed (164) hide show
  1. package/AGENTS.md +1 -1
  2. package/e2e/AGENTS.md +1 -1
  3. package/e2e/actions.ts +4 -4
  4. package/e2e/app/server-default.spec.ts +1 -1
  5. package/e2e/fixtures.ts +2 -2
  6. package/e2e/projects/projects-switch.spec.ts +1 -1
  7. package/e2e/projects/workspaces.spec.ts +3 -3
  8. package/e2e/prompt/prompt-drop-file-uri.spec.ts +1 -1
  9. package/e2e/prompt/prompt-history.spec.ts +1 -1
  10. package/e2e/prompt/prompt-shell.spec.ts +1 -1
  11. package/e2e/selectors.ts +1 -1
  12. package/e2e/session/session-composer-dock.spec.ts +4 -4
  13. package/e2e/settings/settings.spec.ts +8 -8
  14. package/e2e/sidebar/sidebar.spec.ts +1 -1
  15. package/e2e/utils.ts +3 -3
  16. package/package.json +7 -9
  17. package/script/e2e-local.ts +9 -9
  18. package/src/app.tsx +8 -8
  19. package/src/components/debug-bar.tsx +1 -1
  20. package/src/components/dialog-connect-provider.tsx +12 -12
  21. package/src/components/dialog-custom-provider.tsx +7 -7
  22. package/src/components/dialog-edit-project.tsx +7 -7
  23. package/src/components/dialog-fork.tsx +6 -6
  24. package/src/components/dialog-manage-models.tsx +6 -6
  25. package/src/components/dialog-release-notes.tsx +3 -3
  26. package/src/components/dialog-select-directory.tsx +6 -6
  27. package/src/components/dialog-select-file.tsx +8 -8
  28. package/src/components/dialog-select-mcp.tsx +3 -3
  29. package/src/components/dialog-select-model-unpaid.tsx +12 -12
  30. package/src/components/dialog-select-model.tsx +8 -8
  31. package/src/components/dialog-select-provider.tsx +10 -10
  32. package/src/components/dialog-select-server.tsx +10 -10
  33. package/src/components/dialog-settings.tsx +3 -3
  34. package/src/components/file-tree.test.ts +4 -4
  35. package/src/components/file-tree.tsx +4 -4
  36. package/src/components/prompt-input/attachments.ts +1 -1
  37. package/src/components/prompt-input/build-request-parts.test.ts +2 -2
  38. package/src/components/prompt-input/build-request-parts.ts +2 -2
  39. package/src/components/prompt-input/context-items.tsx +4 -4
  40. package/src/components/prompt-input/drag-overlay.tsx +1 -1
  41. package/src/components/prompt-input/image-attachments.tsx +1 -1
  42. package/src/components/prompt-input/slash-popover.tsx +3 -3
  43. package/src/components/prompt-input/submit.test.ts +3 -3
  44. package/src/components/prompt-input/submit.ts +4 -4
  45. package/src/components/prompt-input.tsx +11 -11
  46. package/src/components/server/server-row.tsx +1 -1
  47. package/src/components/session/session-context-breakdown.test.ts +1 -1
  48. package/src/components/session/session-context-breakdown.ts +1 -1
  49. package/src/components/session/session-context-metrics.test.ts +1 -1
  50. package/src/components/session/session-context-metrics.ts +1 -1
  51. package/src/components/session/session-context-tab.tsx +9 -9
  52. package/src/components/session/session-header.tsx +12 -12
  53. package/src/components/session/session-new-view.tsx +3 -3
  54. package/src/components/session/session-sortable-tab.tsx +5 -5
  55. package/src/components/session/session-sortable-terminal-tab.tsx +4 -4
  56. package/src/components/session-context-usage.tsx +3 -3
  57. package/src/components/settings-general.tsx +7 -7
  58. package/src/components/settings-keybinds.tsx +5 -5
  59. package/src/components/settings-models.tsx +6 -6
  60. package/src/components/settings-providers.tsx +10 -10
  61. package/src/components/status-popover.tsx +7 -7
  62. package/src/components/terminal.tsx +3 -3
  63. package/src/components/titlebar.tsx +8 -8
  64. package/src/context/command.tsx +2 -2
  65. package/src/context/comments.test.ts +1 -1
  66. package/src/context/comments.tsx +1 -1
  67. package/src/context/file/content-cache.ts +1 -1
  68. package/src/context/file/path.test.ts +6 -6
  69. package/src/context/file/tree-store.ts +1 -1
  70. package/src/context/file/types.ts +1 -1
  71. package/src/context/file/watcher.ts +1 -1
  72. package/src/context/file.tsx +3 -3
  73. package/src/context/global-sdk.tsx +2 -2
  74. package/src/context/global-sync/bootstrap.ts +5 -5
  75. package/src/context/global-sync/child-store.ts +1 -1
  76. package/src/context/global-sync/event-reducer.test.ts +1 -1
  77. package/src/context/global-sync/event-reducer.ts +2 -2
  78. package/src/context/global-sync/session-cache.test.ts +1 -1
  79. package/src/context/global-sync/session-cache.ts +1 -1
  80. package/src/context/global-sync/session-trim.test.ts +1 -1
  81. package/src/context/global-sync/session-trim.ts +1 -1
  82. package/src/context/global-sync/types.ts +1 -1
  83. package/src/context/global-sync/utils.ts +1 -1
  84. package/src/context/global-sync.tsx +3 -3
  85. package/src/context/highlights.tsx +2 -2
  86. package/src/context/language.tsx +18 -18
  87. package/src/context/layout.tsx +2 -2
  88. package/src/context/local.tsx +2 -2
  89. package/src/context/models.tsx +1 -1
  90. package/src/context/notification.tsx +4 -4
  91. package/src/context/permission-auto-respond.test.ts +2 -2
  92. package/src/context/permission-auto-respond.ts +1 -1
  93. package/src/context/permission.tsx +2 -2
  94. package/src/context/platform.tsx +1 -1
  95. package/src/context/prompt.tsx +2 -2
  96. package/src/context/sdk.tsx +2 -2
  97. package/src/context/server.tsx +1 -1
  98. package/src/context/settings.tsx +1 -1
  99. package/src/context/sync-optimistic.test.ts +1 -1
  100. package/src/context/sync.tsx +4 -4
  101. package/src/context/terminal.test.ts +1 -1
  102. package/src/context/terminal.tsx +1 -1
  103. package/src/entry.tsx +1 -1
  104. package/src/hooks/use-providers.ts +3 -3
  105. package/src/i18n/ar.ts +26 -26
  106. package/src/i18n/br.ts +26 -26
  107. package/src/i18n/bs.ts +26 -26
  108. package/src/i18n/da.ts +26 -26
  109. package/src/i18n/de.ts +26 -26
  110. package/src/i18n/en.ts +26 -26
  111. package/src/i18n/es.ts +26 -26
  112. package/src/i18n/fr.ts +26 -26
  113. package/src/i18n/ja.ts +26 -26
  114. package/src/i18n/ko.ts +26 -26
  115. package/src/i18n/no.ts +26 -26
  116. package/src/i18n/pl.ts +26 -26
  117. package/src/i18n/ru.ts +26 -26
  118. package/src/i18n/th.ts +26 -26
  119. package/src/i18n/tr.ts +26 -26
  120. package/src/i18n/zh.ts +25 -25
  121. package/src/i18n/zht.ts +25 -25
  122. package/src/index.css +1 -1
  123. package/src/pages/directory-layout.tsx +3 -3
  124. package/src/pages/error.tsx +4 -4
  125. package/src/pages/home.tsx +5 -5
  126. package/src/pages/layout/deep-links.ts +2 -2
  127. package/src/pages/layout/helpers.test.ts +20 -20
  128. package/src/pages/layout/helpers.ts +2 -2
  129. package/src/pages/layout/inline-editor.tsx +1 -1
  130. package/src/pages/layout/sidebar-items.tsx +10 -10
  131. package/src/pages/layout/sidebar-project.tsx +5 -5
  132. package/src/pages/layout/sidebar-shell.tsx +2 -2
  133. package/src/pages/layout/sidebar-workspace.tsx +10 -10
  134. package/src/pages/layout.tsx +14 -14
  135. package/src/pages/session/composer/session-composer-region.tsx +1 -1
  136. package/src/pages/session/composer/session-composer-state.test.ts +1 -1
  137. package/src/pages/session/composer/session-composer-state.ts +2 -2
  138. package/src/pages/session/composer/session-followup-dock.tsx +3 -3
  139. package/src/pages/session/composer/session-permission-dock.tsx +4 -4
  140. package/src/pages/session/composer/session-question-dock.tsx +5 -5
  141. package/src/pages/session/composer/session-request-tree.ts +1 -1
  142. package/src/pages/session/composer/session-revert-dock.tsx +3 -3
  143. package/src/pages/session/composer/session-todo-dock.tsx +8 -8
  144. package/src/pages/session/file-tabs.tsx +10 -10
  145. package/src/pages/session/message-timeline.tsx +16 -16
  146. package/src/pages/session/review-tab.tsx +3 -3
  147. package/src/pages/session/session-model-helpers.test.ts +1 -1
  148. package/src/pages/session/session-model-helpers.ts +1 -1
  149. package/src/pages/session/session-side-panel.tsx +6 -6
  150. package/src/pages/session/terminal-panel.tsx +4 -4
  151. package/src/pages/session/use-session-commands.tsx +5 -5
  152. package/src/pages/session/use-session-hash-scroll.ts +1 -1
  153. package/src/pages/session.tsx +10 -10
  154. package/src/testing/session-composer.ts +2 -2
  155. package/src/theme-preload.test.ts +8 -8
  156. package/src/utils/base64.ts +1 -1
  157. package/src/utils/persist.test.ts +11 -11
  158. package/src/utils/persist.ts +4 -4
  159. package/src/utils/prompt.test.ts +1 -1
  160. package/src/utils/prompt.ts +1 -1
  161. package/src/utils/server-errors.test.ts +2 -2
  162. package/src/utils/server.ts +2 -2
  163. package/src/utils/sound.ts +45 -45
  164. package/src/utils/worktree.test.ts +1 -1
package/AGENTS.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Local Dev
6
6
 
7
- - `opencode dev web` proxies `https://app.code.reign-labs.com`, so local UI/CSS changes will not show there.
7
+ - `reigncode.dev web` proxies `https://app.code.reign-labs.com`, so local UI/CSS changes will not show there.
8
8
  - For local UI changes, run the backend and app dev servers separately.
9
9
  - Backend (from `packages/reigncode`): `bun run --conditions=browser ./src/index.ts serve --port 4096`
10
10
  - App (from `packages/app`): `bun dev -- --port 4444`
package/e2e/AGENTS.md CHANGED
@@ -59,7 +59,7 @@ test("test description", async ({ page, sdk, gotoSession }) => {
59
59
  ### Using Fixtures
60
60
 
61
61
  - `page` - Playwright page
62
- - `sdk` - OpenCode SDK client for API calls
62
+ - `sdk` - ReignCode SDK client for API calls
63
63
  - `gotoSession(sessionID?)` - Navigate to session
64
64
 
65
65
  ### Helper Functions
package/e2e/actions.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { base64Decode, base64Encode } from "@reign-labs/util/encode"
1
+ import { base64Decode, base64Encode } from "reigncode-util/encode"
2
2
  import { expect, type Locator, type Page } from "@playwright/test"
3
3
  import fs from "node:fs/promises"
4
4
  import os from "node:os"
@@ -315,7 +315,7 @@ export async function openSettings(page: Page) {
315
315
  export async function seedProjects(page: Page, input: { directory: string; extra?: string[] }) {
316
316
  await page.addInitScript(
317
317
  (args: { directory: string; serverUrl: string; extra: string[] }) => {
318
- const key = "opencode.global.dat:server"
318
+ const key = "reigncode.global.dat:server"
319
319
  const raw = localStorage.getItem(key)
320
320
  const parsed = (() => {
321
321
  if (!raw) return undefined
@@ -367,13 +367,13 @@ export async function seedProjects(page: Page, input: { directory: string; extra
367
367
  }
368
368
 
369
369
  export async function createTestProject() {
370
- const root = await fs.mkdtemp(path.join(os.tmpdir(), "opencode-e2e-project-"))
370
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), "reigncode-e2e-project-"))
371
371
  const id = `e2e-${path.basename(root)}`
372
372
 
373
373
  await fs.writeFile(path.join(root, "README.md"), `# e2e\n\n${id}\n`)
374
374
 
375
375
  execSync("git init", { cwd: root, stdio: "ignore" })
376
- await fs.writeFile(path.join(root, ".git", "opencode"), id)
376
+ await fs.writeFile(path.join(root, ".git", "reigncode"), id)
377
377
  execSync("git config core.fsmonitor false", { cwd: root, stdio: "ignore" })
378
378
  execSync("git add -A", { cwd: root, stdio: "ignore" })
379
379
  execSync('git -c user.name="e2e" -c user.email="e2e@example.com" commit -m "init" --allow-empty', {
@@ -2,7 +2,7 @@ import { test, expect } from "../fixtures"
2
2
  import { serverNamePattern, serverUrls } from "../utils"
3
3
  import { closeDialog, clickMenuItem } from "../actions"
4
4
 
5
- const DEFAULT_SERVER_URL_KEY = "opencode.settings.dat:defaultServerUrl"
5
+ const DEFAULT_SERVER_URL_KEY = "reigncode.settings.dat:defaultServerUrl"
6
6
 
7
7
  test("can set a default server on web", async ({ page, gotoSession }) => {
8
8
  await page.addInitScript((key: string) => {
package/e2e/fixtures.ts CHANGED
@@ -141,9 +141,9 @@ async function seedStorage(page: Page, input: { directory: string; extra?: strin
141
141
  },
142
142
  }
143
143
  localStorage.setItem(
144
- "opencode.global.dat:model",
144
+ "reigncode.global.dat:model",
145
145
  JSON.stringify({
146
- recent: [{ providerID: "opencode", modelID: "big-pickle" }],
146
+ recent: [{ providerID: "reigncode", modelID: "big-pickle" }],
147
147
  user: [],
148
148
  variant: {},
149
149
  }),
@@ -1,4 +1,4 @@
1
- import { base64Decode } from "@reign-labs/util/encode"
1
+ import { base64Decode } from "reigncode-util/encode"
2
2
  import { test, expect } from "../fixtures"
3
3
  import {
4
4
  defocus,
@@ -1,7 +1,7 @@
1
1
  import fs from "node:fs/promises"
2
2
  import os from "node:os"
3
3
  import path from "node:path"
4
- import { base64Decode } from "@reign-labs/util/encode"
4
+ import { base64Decode } from "reigncode-util/encode"
5
5
  import type { Page } from "@playwright/test"
6
6
 
7
7
  import { test, expect } from "../fixtures"
@@ -110,7 +110,7 @@ test("can create a workspace", async ({ page, withProject }) => {
110
110
  test("non-git projects keep workspace mode disabled", async ({ page, withProject }) => {
111
111
  await page.setViewportSize({ width: 1400, height: 800 })
112
112
 
113
- const nonGit = await fs.mkdtemp(path.join(os.tmpdir(), "opencode-e2e-project-nongit-"))
113
+ const nonGit = await fs.mkdtemp(path.join(os.tmpdir(), "reigncode-e2e-project-nongit-"))
114
114
  const nonGitSlug = dirSlug(nonGit)
115
115
 
116
116
  await fs.writeFile(path.join(nonGit, "README.md"), "# e2e nongit\n")
@@ -122,7 +122,7 @@ test("non-git projects keep workspace mode disabled", async ({ page, withProject
122
122
  await expect.poll(() => slugFromUrl(page.url()), { timeout: 30_000 }).not.toBe("")
123
123
 
124
124
  const activeDir = await resolveSlug(slugFromUrl(page.url())).then((item) => item.directory)
125
- expect(path.basename(activeDir)).toContain("opencode-e2e-project-nongit-")
125
+ expect(path.basename(activeDir)).toContain("reigncode-e2e-project-nongit-")
126
126
 
127
127
  await openSidebar(page)
128
128
  await expect(page.getByRole("button", { name: "New workspace" })).toHaveCount(0)
@@ -7,7 +7,7 @@ test("dropping text/plain file: uri inserts a file pill", async ({ page, gotoSes
7
7
  const prompt = page.locator(promptSelector)
8
8
  await prompt.click()
9
9
 
10
- const path = process.platform === "win32" ? "C:\\opencode-e2e-drop.txt" : "/tmp/opencode-e2e-drop.txt"
10
+ const path = process.platform === "win32" ? "C:\\reigncode-e2e-drop.txt" : "/tmp/reigncode-e2e-drop.txt"
11
11
  const dt = await page.evaluateHandle((text) => {
12
12
  const dt = new DataTransfer()
13
13
  dt.setData("text/plain", text)
@@ -1,4 +1,4 @@
1
- import type { ToolPart } from "@reign-labs/sdk/v2/client"
1
+ import type { ToolPart } from "reigncode-sdk/v2/client"
2
2
  import type { Page } from "@playwright/test"
3
3
  import { test, expect } from "../fixtures"
4
4
  import { withSession } from "../actions"
@@ -1,4 +1,4 @@
1
- import type { ToolPart } from "@reign-labs/sdk/v2/client"
1
+ import type { ToolPart } from "reigncode-sdk/v2/client"
2
2
  import { test, expect } from "../fixtures"
3
3
  import { sessionIDFromUrl } from "../actions"
4
4
  import { promptSelector } from "../selectors"
package/e2e/selectors.ts CHANGED
@@ -45,7 +45,7 @@ export const projectClearNotificationsSelector = (slug: string) =>
45
45
  export const projectWorkspacesToggleSelector = (slug: string) =>
46
46
  `[data-action="project-workspaces-toggle"][data-project="${slug}"]`
47
47
 
48
- export const titlebarRightSelector = "#opencode-titlebar-right"
48
+ export const titlebarRightSelector = "#reigncode-titlebar-right"
49
49
 
50
50
  export const popoverBodySelector = '[data-slot="popover-body"]'
51
51
 
@@ -313,7 +313,7 @@ test("blocked permission flow supports allow once", async ({ page, sdk, gotoSess
313
313
  id: "per_e2e_once",
314
314
  sessionID: session.id,
315
315
  permission: "bash",
316
- patterns: ["/tmp/opencode-e2e-perm-once"],
316
+ patterns: ["/tmp/reigncode-e2e-perm-once"],
317
317
  metadata: { description: "Need permission for command" },
318
318
  },
319
319
  undefined,
@@ -340,7 +340,7 @@ test("blocked permission flow supports reject", async ({ page, sdk, gotoSession
340
340
  id: "per_e2e_reject",
341
341
  sessionID: session.id,
342
342
  permission: "bash",
343
- patterns: ["/tmp/opencode-e2e-perm-reject"],
343
+ patterns: ["/tmp/reigncode-e2e-perm-reject"],
344
344
  },
345
345
  undefined,
346
346
  async (state) => {
@@ -366,7 +366,7 @@ test("blocked permission flow supports allow always", async ({ page, sdk, gotoSe
366
366
  id: "per_e2e_always",
367
367
  sessionID: session.id,
368
368
  permission: "bash",
369
- patterns: ["/tmp/opencode-e2e-perm-always"],
369
+ patterns: ["/tmp/reigncode-e2e-perm-always"],
370
370
  metadata: { description: "Need permission for command" },
371
371
  },
372
372
  undefined,
@@ -453,7 +453,7 @@ test("child session permission request blocks parent dock and supports allow onc
453
453
  id: "per_e2e_child",
454
454
  sessionID: child.id,
455
455
  permission: "bash",
456
- patterns: ["/tmp/opencode-e2e-perm-child"],
456
+ patterns: ["/tmp/reigncode-e2e-perm-child"],
457
457
  metadata: { description: "Need child permission" },
458
458
  },
459
459
  { child },
@@ -29,7 +29,7 @@ test("smoke settings dialog opens, switches tabs, closes", async ({ page, gotoSe
29
29
 
30
30
  test("changing language updates settings labels", async ({ page, gotoSession }) => {
31
31
  await page.addInitScript(() => {
32
- localStorage.setItem("opencode.global.dat:language", JSON.stringify({ locale: "en" }))
32
+ localStorage.setItem("reigncode.global.dat:language", JSON.stringify({ locale: "en" }))
33
33
  })
34
34
 
35
35
  await gotoSession()
@@ -104,7 +104,7 @@ test("changing theme persists in localStorage", async ({ page, gotoSession }) =>
104
104
  await page.keyboard.press("Escape")
105
105
 
106
106
  const storedThemeId = await page.evaluate(() => {
107
- return localStorage.getItem("opencode-theme-id")
107
+ return localStorage.getItem("reigncode-theme-id")
108
108
  })
109
109
 
110
110
  expect(storedThemeId).not.toBeNull()
@@ -118,9 +118,9 @@ test("changing theme persists in localStorage", async ({ page, gotoSession }) =>
118
118
 
119
119
  test("legacy oc-1 theme migrates to oc-2", async ({ page, gotoSession }) => {
120
120
  await page.addInitScript(() => {
121
- localStorage.setItem("opencode-theme-id", "oc-1")
122
- localStorage.setItem("opencode-theme-css-light", "--background-base:#fff;")
123
- localStorage.setItem("opencode-theme-css-dark", "--background-base:#000;")
121
+ localStorage.setItem("reigncode-theme-id", "oc-1")
122
+ localStorage.setItem("reigncode-theme-css-light", "--background-base:#fff;")
123
+ localStorage.setItem("reigncode-theme-css-dark", "--background-base:#000;")
124
124
  })
125
125
 
126
126
  await gotoSession()
@@ -130,7 +130,7 @@ test("legacy oc-1 theme migrates to oc-2", async ({ page, gotoSession }) => {
130
130
  await expect
131
131
  .poll(async () => {
132
132
  return await page.evaluate(() => {
133
- return localStorage.getItem("opencode-theme-id")
133
+ return localStorage.getItem("reigncode-theme-id")
134
134
  })
135
135
  })
136
136
  .toBe("oc-2")
@@ -138,7 +138,7 @@ test("legacy oc-1 theme migrates to oc-2", async ({ page, gotoSession }) => {
138
138
  await expect
139
139
  .poll(async () => {
140
140
  return await page.evaluate(() => {
141
- return localStorage.getItem("opencode-theme-css-light")
141
+ return localStorage.getItem("reigncode-theme-css-light")
142
142
  })
143
143
  })
144
144
  .toBeNull()
@@ -146,7 +146,7 @@ test("legacy oc-1 theme migrates to oc-2", async ({ page, gotoSession }) => {
146
146
  await expect
147
147
  .poll(async () => {
148
148
  return await page.evaluate(() => {
149
- return localStorage.getItem("opencode-theme-css-dark")
149
+ return localStorage.getItem("reigncode-theme-css-dark")
150
150
  })
151
151
  })
152
152
  .toBeNull()
@@ -32,7 +32,7 @@ test("sidebar collapsed state persists across navigation and reload", async ({ p
32
32
  await expect(button).toHaveAttribute("aria-expanded", "false")
33
33
 
34
34
  const opened = await page.evaluate(
35
- () => JSON.parse(localStorage.getItem("opencode.global.dat:layout") ?? "{}").sidebar?.opened,
35
+ () => JSON.parse(localStorage.getItem("reigncode.global.dat:layout") ?? "{}").sidebar?.opened,
36
36
  )
37
37
  await expect(opened).toBe(false)
38
38
  })
package/e2e/utils.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { createOpencodeClient } from "@reign-labs/sdk/v2/client"
2
- import { base64Encode, checksum } from "@reign-labs/util/encode"
1
+ import { createOpencodeClient } from "reigncode-sdk/v2/client"
2
+ import { base64Encode, checksum } from "reigncode-util/encode"
3
3
 
4
4
  export const serverHost = process.env.PLAYWRIGHT_SERVER_HOST ?? "127.0.0.1"
5
5
  export const serverPort = process.env.PLAYWRIGHT_SERVER_PORT ?? "4096"
@@ -59,5 +59,5 @@ export function sessionPath(directory: string, sessionID?: string) {
59
59
  export function workspacePersistKey(directory: string, key: string) {
60
60
  const head = (directory.slice(0, 12) || "workspace").replace(/[^a-zA-Z0-9._-]/g, "-")
61
61
  const sum = checksum(directory) ?? "0"
62
- return `opencode.workspace.${head}.${sum}.dat:workspace:${key}`
62
+ return `reigncode.workspace.${head}.${sum}.dat:workspace:${key}`
63
63
  }
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "reigncode-app",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
7
- ".": {
8
- "import": "./dist/index.js",
9
- "types": "./dist/index.d.ts"
10
- },
7
+ ".": "./src/index.ts",
11
8
  "./vite": "./vite.js",
12
9
  "./index.css": "./src/index.css"
13
10
  },
@@ -42,6 +39,9 @@
42
39
  },
43
40
  "dependencies": {
44
41
  "@kobalte/core": "catalog:",
42
+ "reigncode-sdk": "workspace:*",
43
+ "reigncode-ui": "workspace:*",
44
+ "reigncode-util": "workspace:*",
45
45
  "@shikijs/transformers": "3.9.2",
46
46
  "@solid-primitives/active-element": "2.1.3",
47
47
  "@solid-primitives/audio": "1.4.2",
@@ -70,8 +70,6 @@
70
70
  "solid-list": "catalog:",
71
71
  "tailwindcss": "catalog:",
72
72
  "virtua": "catalog:",
73
- "zod": "catalog:",
74
- "reigncode-sdk": "1.3.2",
75
- "reign-ui": "1.3.2"
73
+ "zod": "catalog:"
76
74
  }
77
- }
75
+ }
@@ -44,7 +44,7 @@ async function waitForHealth(url: string) {
44
44
 
45
45
  const appDir = process.cwd()
46
46
  const repoDir = path.resolve(appDir, "../..")
47
- const opencodeDir = path.join(repoDir, "packages", "opencode")
47
+ const opencodeDir = path.join(repoDir, "packages", "reigncode")
48
48
 
49
49
  const extraArgs = (() => {
50
50
  const args = process.argv.slice(2)
@@ -54,7 +54,7 @@ const extraArgs = (() => {
54
54
 
55
55
  const [serverPort, webPort] = await Promise.all([freePort(), freePort()])
56
56
 
57
- const sandbox = await fs.mkdtemp(path.join(os.tmpdir(), "opencode-e2e-"))
57
+ const sandbox = await fs.mkdtemp(path.join(os.tmpdir(), "reigncode-e2e-"))
58
58
  const keepSandbox = process.env.REIGNCODE_E2E_KEEP_SANDBOX === "1"
59
59
 
60
60
  const serverEnv = {
@@ -71,7 +71,7 @@ const serverEnv = {
71
71
  REIGNCODE_E2E_PROJECT_DIR: repoDir,
72
72
  REIGNCODE_E2E_SESSION_TITLE: "E2E Session",
73
73
  REIGNCODE_E2E_MESSAGE: "Seeded for UI e2e",
74
- REIGNCODE_E2E_MODEL: "opencode/gpt-5-nano",
74
+ REIGNCODE_E2E_MODEL: "reigncode/gpt-5-nano",
75
75
  REIGNCODE_CLIENT: "app",
76
76
  REIGNCODE_STRICT_CONFIG_DEPS: "true",
77
77
  } satisfies Record<string, string>
@@ -145,21 +145,21 @@ try {
145
145
  } else {
146
146
  Object.assign(process.env, serverEnv)
147
147
  process.env.AGENT = "1"
148
- process.env.OPENCODE = "1"
148
+ process.env.REIGNCODE = "1"
149
149
  process.env.REIGNCODE_PID = String(process.pid)
150
150
 
151
- const log = await import("../../opencode/src/util/log")
152
- const install = await import("../../opencode/src/installation")
151
+ const log = await import("../../reigncode/src/util/log")
152
+ const install = await import("../../reigncode/src/installation")
153
153
  await log.Log.init({
154
154
  print: true,
155
155
  dev: install.Installation.isLocal(),
156
156
  level: "WARN",
157
157
  })
158
158
 
159
- const servermod = await import("../../opencode/src/server/server")
160
- inst = await import("../../opencode/src/project/instance")
159
+ const servermod = await import("../../reigncode/src/server/server")
160
+ inst = await import("../../reigncode/src/project/instance")
161
161
  server = servermod.Server.listen({ port: serverPort, hostname: "127.0.0.1" })
162
- console.log(`opencode server listening on http://127.0.0.1:${serverPort}`)
162
+ console.log(`reigncode server listening on http://127.0.0.1:${serverPort}`)
163
163
 
164
164
  await waitForHealth(`http://127.0.0.1:${serverPort}/global/health`)
165
165
  runner = Bun.spawn(["bun", "test:e2e", ...extraArgs], {
package/src/app.tsx CHANGED
@@ -1,12 +1,12 @@
1
1
  import "@/index.css"
2
- import { I18nProvider } from "@reign-labs/ui/context"
3
- import { DialogProvider } from "@reign-labs/ui/context/dialog"
4
- import { FileComponentProvider } from "@reign-labs/ui/context/file"
5
- import { MarkedProvider } from "@reign-labs/ui/context/marked"
6
- import { File } from "@reign-labs/ui/file"
7
- import { Font } from "@reign-labs/ui/font"
8
- import { Splash } from "@reign-labs/ui/logo"
9
- import { ThemeProvider } from "@reign-labs/ui/theme"
2
+ import { I18nProvider } from "reigncode-ui/context"
3
+ import { DialogProvider } from "reigncode-ui/context/dialog"
4
+ import { FileComponentProvider } from "reigncode-ui/context/file"
5
+ import { MarkedProvider } from "reigncode-ui/context/marked"
6
+ import { File } from "reigncode-ui/file"
7
+ import { Font } from "reigncode-ui/font"
8
+ import { Splash } from "reigncode-ui/logo"
9
+ import { ThemeProvider } from "reigncode-ui/theme"
10
10
  import { MetaProvider } from "@solidjs/meta"
11
11
  import { type BaseRouterProps, Navigate, Route, Router } from "@solidjs/router"
12
12
  import { QueryClient, QueryClientProvider } from "@tanstack/solid-query"
@@ -1,7 +1,7 @@
1
1
  import { useIsRouting, useLocation } from "@solidjs/router"
2
2
  import { batch, createEffect, onCleanup, onMount } from "solid-js"
3
3
  import { createStore } from "solid-js/store"
4
- import { Tooltip } from "@reign-labs/ui/tooltip"
4
+ import { Tooltip } from "reigncode-ui/tooltip"
5
5
  import { useLanguage } from "@/context/language"
6
6
 
7
7
  type Mem = Performance & {
@@ -1,14 +1,14 @@
1
- import type { ProviderAuthAuthorization } from "@reign-labs/sdk/v2/client"
2
- import { Button } from "@reign-labs/ui/button"
3
- import { useDialog } from "@reign-labs/ui/context/dialog"
4
- import { Dialog } from "@reign-labs/ui/dialog"
5
- import { Icon } from "@reign-labs/ui/icon"
6
- import { IconButton } from "@reign-labs/ui/icon-button"
7
- import { List, type ListRef } from "@reign-labs/ui/list"
8
- import { ProviderIcon } from "@reign-labs/ui/provider-icon"
9
- import { Spinner } from "@reign-labs/ui/spinner"
10
- import { TextField } from "@reign-labs/ui/text-field"
11
- import { showToast } from "@reign-labs/ui/toast"
1
+ import type { ProviderAuthAuthorization } from "reigncode-sdk/v2/client"
2
+ import { Button } from "reigncode-ui/button"
3
+ import { useDialog } from "reigncode-ui/context/dialog"
4
+ import { Dialog } from "reigncode-ui/dialog"
5
+ import { Icon } from "reigncode-ui/icon"
6
+ import { IconButton } from "reigncode-ui/icon-button"
7
+ import { List, type ListRef } from "reigncode-ui/list"
8
+ import { ProviderIcon } from "reigncode-ui/provider-icon"
9
+ import { Spinner } from "reigncode-ui/spinner"
10
+ import { TextField } from "reigncode-ui/text-field"
11
+ import { showToast } from "reigncode-ui/toast"
12
12
  import { createMemo, Match, onCleanup, onMount, Switch } from "solid-js"
13
13
  import { createStore, produce } from "solid-js/store"
14
14
  import { Link } from "@/components/link"
@@ -393,7 +393,7 @@ export function DialogConnectProvider(props: { provider: string }) {
393
393
  return (
394
394
  <div class="flex flex-col gap-6">
395
395
  <Switch>
396
- <Match when={provider().id === "opencode"}>
396
+ <Match when={provider().id === "reigncode"}>
397
397
  <div class="flex flex-col gap-4">
398
398
  <div class="text-14-regular text-text-base">{language.t("provider.connect.opencodeZen.line1")}</div>
399
399
  <div class="text-14-regular text-text-base">{language.t("provider.connect.opencodeZen.line2")}</div>
@@ -1,11 +1,11 @@
1
- import { Button } from "@reign-labs/ui/button"
2
- import { useDialog } from "@reign-labs/ui/context/dialog"
3
- import { Dialog } from "@reign-labs/ui/dialog"
4
- import { IconButton } from "@reign-labs/ui/icon-button"
5
- import { ProviderIcon } from "@reign-labs/ui/provider-icon"
1
+ import { Button } from "reigncode-ui/button"
2
+ import { useDialog } from "reigncode-ui/context/dialog"
3
+ import { Dialog } from "reigncode-ui/dialog"
4
+ import { IconButton } from "reigncode-ui/icon-button"
5
+ import { ProviderIcon } from "reigncode-ui/provider-icon"
6
6
  import { useMutation } from "@tanstack/solid-query"
7
- import { TextField } from "@reign-labs/ui/text-field"
8
- import { showToast } from "@reign-labs/ui/toast"
7
+ import { TextField } from "reigncode-ui/text-field"
8
+ import { showToast } from "reigncode-ui/toast"
9
9
  import { batch, For } from "solid-js"
10
10
  import { createStore, produce } from "solid-js/store"
11
11
  import { Link } from "@/components/link"
@@ -1,16 +1,16 @@
1
- import { Button } from "@reign-labs/ui/button"
2
- import { useDialog } from "@reign-labs/ui/context/dialog"
3
- import { Dialog } from "@reign-labs/ui/dialog"
4
- import { TextField } from "@reign-labs/ui/text-field"
1
+ import { Button } from "reigncode-ui/button"
2
+ import { useDialog } from "reigncode-ui/context/dialog"
3
+ import { Dialog } from "reigncode-ui/dialog"
4
+ import { TextField } from "reigncode-ui/text-field"
5
5
  import { useMutation } from "@tanstack/solid-query"
6
- import { Icon } from "@reign-labs/ui/icon"
6
+ import { Icon } from "reigncode-ui/icon"
7
7
  import { createMemo, For, Show } from "solid-js"
8
8
  import { createStore } from "solid-js/store"
9
9
  import { useGlobalSDK } from "@/context/global-sdk"
10
10
  import { useGlobalSync } from "@/context/global-sync"
11
11
  import { type LocalProject, getAvatarColors } from "@/context/layout"
12
- import { getFilename } from "@reign-labs/util/path"
13
- import { Avatar } from "@reign-labs/ui/avatar"
12
+ import { getFilename } from "reigncode-util/path"
13
+ import { Avatar } from "reigncode-ui/avatar"
14
14
  import { useLanguage } from "@/context/language"
15
15
 
16
16
  const AVATAR_COLOR_KEYS = ["pink", "mint", "orange", "purple", "cyan", "lime"] as const
@@ -3,13 +3,13 @@ import { useNavigate, useParams } from "@solidjs/router"
3
3
  import { useSync } from "@/context/sync"
4
4
  import { useSDK } from "@/context/sdk"
5
5
  import { usePrompt } from "@/context/prompt"
6
- import { useDialog } from "@reign-labs/ui/context/dialog"
7
- import { Dialog } from "@reign-labs/ui/dialog"
8
- import { List } from "@reign-labs/ui/list"
9
- import { showToast } from "@reign-labs/ui/toast"
6
+ import { useDialog } from "reigncode-ui/context/dialog"
7
+ import { Dialog } from "reigncode-ui/dialog"
8
+ import { List } from "reigncode-ui/list"
9
+ import { showToast } from "reigncode-ui/toast"
10
10
  import { extractPromptFromParts } from "@/utils/prompt"
11
- import type { TextPart as SDKTextPart } from "@reign-labs/sdk/v2/client"
12
- import { base64Encode } from "@reign-labs/util/encode"
11
+ import type { TextPart as SDKTextPart } from "reigncode-sdk/v2/client"
12
+ import { base64Encode } from "reigncode-util/encode"
13
13
  import { useLanguage } from "@/context/language"
14
14
 
15
15
  interface ForkableMessage {
@@ -1,13 +1,13 @@
1
- import { Dialog } from "@reign-labs/ui/dialog"
2
- import { List } from "@reign-labs/ui/list"
3
- import { Switch } from "@reign-labs/ui/switch"
4
- import { Tooltip } from "@reign-labs/ui/tooltip"
5
- import { Button } from "@reign-labs/ui/button"
1
+ import { Dialog } from "reigncode-ui/dialog"
2
+ import { List } from "reigncode-ui/list"
3
+ import { Switch } from "reigncode-ui/switch"
4
+ import { Tooltip } from "reigncode-ui/tooltip"
5
+ import { Button } from "reigncode-ui/button"
6
6
  import type { Component } from "solid-js"
7
7
  import { useLocal } from "@/context/local"
8
8
  import { popularProviders } from "@/hooks/use-providers"
9
9
  import { useLanguage } from "@/context/language"
10
- import { useDialog } from "@reign-labs/ui/context/dialog"
10
+ import { useDialog } from "reigncode-ui/context/dialog"
11
11
  import { DialogSelectProvider } from "./dialog-select-provider"
12
12
 
13
13
  export const DialogManageModels: Component = () => {
@@ -1,7 +1,7 @@
1
1
  import { createSignal } from "solid-js"
2
- import { Dialog } from "@reign-labs/ui/dialog"
3
- import { Button } from "@reign-labs/ui/button"
4
- import { useDialog } from "@reign-labs/ui/context/dialog"
2
+ import { Dialog } from "reigncode-ui/dialog"
3
+ import { Button } from "reigncode-ui/button"
4
+ import { useDialog } from "reigncode-ui/context/dialog"
5
5
  import { useLanguage } from "@/context/language"
6
6
  import { useSettings } from "@/context/settings"
7
7
 
@@ -1,9 +1,9 @@
1
- import { useDialog } from "@reign-labs/ui/context/dialog"
2
- import { Dialog } from "@reign-labs/ui/dialog"
3
- import { FileIcon } from "@reign-labs/ui/file-icon"
4
- import { List } from "@reign-labs/ui/list"
5
- import type { ListRef } from "@reign-labs/ui/list"
6
- import { getDirectory, getFilename } from "@reign-labs/util/path"
1
+ import { useDialog } from "reigncode-ui/context/dialog"
2
+ import { Dialog } from "reigncode-ui/dialog"
3
+ import { FileIcon } from "reigncode-ui/file-icon"
4
+ import { List } from "reigncode-ui/list"
5
+ import type { ListRef } from "reigncode-ui/list"
6
+ import { getDirectory, getFilename } from "reigncode-util/path"
7
7
  import fuzzysort from "fuzzysort"
8
8
  import { createMemo, createResource, createSignal } from "solid-js"
9
9
  import { useGlobalSDK } from "@/context/global-sdk"
@@ -1,11 +1,11 @@
1
- import { useDialog } from "@reign-labs/ui/context/dialog"
2
- import { Dialog } from "@reign-labs/ui/dialog"
3
- import { FileIcon } from "@reign-labs/ui/file-icon"
4
- import { Icon } from "@reign-labs/ui/icon"
5
- import { Keybind } from "@reign-labs/ui/keybind"
6
- import { List } from "@reign-labs/ui/list"
7
- import { base64Encode } from "@reign-labs/util/encode"
8
- import { getDirectory, getFilename } from "@reign-labs/util/path"
1
+ import { useDialog } from "reigncode-ui/context/dialog"
2
+ import { Dialog } from "reigncode-ui/dialog"
3
+ import { FileIcon } from "reigncode-ui/file-icon"
4
+ import { Icon } from "reigncode-ui/icon"
5
+ import { Keybind } from "reigncode-ui/keybind"
6
+ import { List } from "reigncode-ui/list"
7
+ import { base64Encode } from "reigncode-util/encode"
8
+ import { getDirectory, getFilename } from "reigncode-util/path"
9
9
  import { useNavigate } from "@solidjs/router"
10
10
  import { createMemo, createSignal, Match, onCleanup, Show, Switch } from "solid-js"
11
11
  import { formatKeybind, useCommand, type CommandOption } from "@/context/command"
@@ -2,9 +2,9 @@ import { useMutation } from "@tanstack/solid-query"
2
2
  import { Component, createMemo, Show } from "solid-js"
3
3
  import { useSync } from "@/context/sync"
4
4
  import { useSDK } from "@/context/sdk"
5
- import { Dialog } from "@reign-labs/ui/dialog"
6
- import { List } from "@reign-labs/ui/list"
7
- import { Switch } from "@reign-labs/ui/switch"
5
+ import { Dialog } from "reigncode-ui/dialog"
6
+ import { List } from "reigncode-ui/list"
7
+ import { Switch } from "reigncode-ui/switch"
8
8
  import { useLanguage } from "@/context/language"
9
9
 
10
10
  const statusLabels = {
@@ -1,10 +1,10 @@
1
- import { Button } from "@reign-labs/ui/button"
2
- import { useDialog } from "@reign-labs/ui/context/dialog"
3
- import { Dialog } from "@reign-labs/ui/dialog"
4
- import { List, type ListRef } from "@reign-labs/ui/list"
5
- import { ProviderIcon } from "@reign-labs/ui/provider-icon"
6
- import { Tag } from "@reign-labs/ui/tag"
7
- import { Tooltip } from "@reign-labs/ui/tooltip"
1
+ import { Button } from "reigncode-ui/button"
2
+ import { useDialog } from "reigncode-ui/context/dialog"
3
+ import { Dialog } from "reigncode-ui/dialog"
4
+ import { List, type ListRef } from "reigncode-ui/list"
5
+ import { ProviderIcon } from "reigncode-ui/provider-icon"
6
+ import { Tag } from "reigncode-ui/tag"
7
+ import { Tooltip } from "reigncode-ui/tooltip"
8
8
  import { type Component, Show } from "solid-js"
9
9
  import { useLocal } from "@/context/local"
10
10
  import { popularProviders, useProviders } from "@/hooks/use-providers"
@@ -49,7 +49,7 @@ export const DialogSelectModelUnpaid: Component<{ model?: ModelState }> = (props
49
49
  <ModelTooltip
50
50
  model={item}
51
51
  latest={item.latest}
52
- free={item.provider.id === "opencode" && (!item.cost || item.cost.input === 0)}
52
+ free={item.provider.id === "reigncode" && (!item.cost || item.cost.input === 0)}
53
53
  />
54
54
  }
55
55
  >
@@ -98,13 +98,13 @@ export const DialogSelectModelUnpaid: Component<{ model?: ModelState }> = (props
98
98
  <div class="w-full flex items-center gap-x-3">
99
99
  <ProviderIcon data-slot="list-item-extra-icon" id={i.id} />
100
100
  <span>{i.name}</span>
101
- <Show when={i.id === "opencode"}>
102
- <div class="text-14-regular text-text-weak">{language.t("dialog.provider.opencode.tagline")}</div>
101
+ <Show when={i.id === "reigncode"}>
102
+ <div class="text-14-regular text-text-weak">{language.t("dialog.provider.reigncode.tagline")}</div>
103
103
  </Show>
104
- <Show when={i.id === "opencode"}>
104
+ <Show when={i.id === "reigncode"}>
105
105
  <Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
106
106
  </Show>
107
- <Show when={i.id === "opencode-go"}>
107
+ <Show when={i.id === "reigncode-go"}>
108
108
  <>
109
109
  <div class="text-14-regular text-text-weak">
110
110
  {language.t("dialog.provider.opencodeGo.tagline")}