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.
- package/AGENTS.md +1 -1
- package/e2e/AGENTS.md +1 -1
- package/e2e/actions.ts +4 -4
- package/e2e/app/server-default.spec.ts +1 -1
- package/e2e/fixtures.ts +2 -2
- package/e2e/projects/projects-switch.spec.ts +1 -1
- package/e2e/projects/workspaces.spec.ts +3 -3
- package/e2e/prompt/prompt-drop-file-uri.spec.ts +1 -1
- package/e2e/prompt/prompt-history.spec.ts +1 -1
- package/e2e/prompt/prompt-shell.spec.ts +1 -1
- package/e2e/selectors.ts +1 -1
- package/e2e/session/session-composer-dock.spec.ts +4 -4
- package/e2e/settings/settings.spec.ts +8 -8
- package/e2e/sidebar/sidebar.spec.ts +1 -1
- package/e2e/utils.ts +3 -3
- package/package.json +7 -9
- package/script/e2e-local.ts +9 -9
- package/src/app.tsx +8 -8
- package/src/components/debug-bar.tsx +1 -1
- package/src/components/dialog-connect-provider.tsx +12 -12
- package/src/components/dialog-custom-provider.tsx +7 -7
- package/src/components/dialog-edit-project.tsx +7 -7
- package/src/components/dialog-fork.tsx +6 -6
- package/src/components/dialog-manage-models.tsx +6 -6
- package/src/components/dialog-release-notes.tsx +3 -3
- package/src/components/dialog-select-directory.tsx +6 -6
- package/src/components/dialog-select-file.tsx +8 -8
- package/src/components/dialog-select-mcp.tsx +3 -3
- package/src/components/dialog-select-model-unpaid.tsx +12 -12
- package/src/components/dialog-select-model.tsx +8 -8
- package/src/components/dialog-select-provider.tsx +10 -10
- package/src/components/dialog-select-server.tsx +10 -10
- package/src/components/dialog-settings.tsx +3 -3
- package/src/components/file-tree.test.ts +4 -4
- package/src/components/file-tree.tsx +4 -4
- package/src/components/prompt-input/attachments.ts +1 -1
- package/src/components/prompt-input/build-request-parts.test.ts +2 -2
- package/src/components/prompt-input/build-request-parts.ts +2 -2
- package/src/components/prompt-input/context-items.tsx +4 -4
- package/src/components/prompt-input/drag-overlay.tsx +1 -1
- package/src/components/prompt-input/image-attachments.tsx +1 -1
- package/src/components/prompt-input/slash-popover.tsx +3 -3
- package/src/components/prompt-input/submit.test.ts +3 -3
- package/src/components/prompt-input/submit.ts +4 -4
- package/src/components/prompt-input.tsx +11 -11
- package/src/components/server/server-row.tsx +1 -1
- package/src/components/session/session-context-breakdown.test.ts +1 -1
- package/src/components/session/session-context-breakdown.ts +1 -1
- package/src/components/session/session-context-metrics.test.ts +1 -1
- package/src/components/session/session-context-metrics.ts +1 -1
- package/src/components/session/session-context-tab.tsx +9 -9
- package/src/components/session/session-header.tsx +12 -12
- package/src/components/session/session-new-view.tsx +3 -3
- package/src/components/session/session-sortable-tab.tsx +5 -5
- package/src/components/session/session-sortable-terminal-tab.tsx +4 -4
- package/src/components/session-context-usage.tsx +3 -3
- package/src/components/settings-general.tsx +7 -7
- package/src/components/settings-keybinds.tsx +5 -5
- package/src/components/settings-models.tsx +6 -6
- package/src/components/settings-providers.tsx +10 -10
- package/src/components/status-popover.tsx +7 -7
- package/src/components/terminal.tsx +3 -3
- package/src/components/titlebar.tsx +8 -8
- package/src/context/command.tsx +2 -2
- package/src/context/comments.test.ts +1 -1
- package/src/context/comments.tsx +1 -1
- package/src/context/file/content-cache.ts +1 -1
- package/src/context/file/path.test.ts +6 -6
- package/src/context/file/tree-store.ts +1 -1
- package/src/context/file/types.ts +1 -1
- package/src/context/file/watcher.ts +1 -1
- package/src/context/file.tsx +3 -3
- package/src/context/global-sdk.tsx +2 -2
- package/src/context/global-sync/bootstrap.ts +5 -5
- package/src/context/global-sync/child-store.ts +1 -1
- package/src/context/global-sync/event-reducer.test.ts +1 -1
- package/src/context/global-sync/event-reducer.ts +2 -2
- package/src/context/global-sync/session-cache.test.ts +1 -1
- package/src/context/global-sync/session-cache.ts +1 -1
- package/src/context/global-sync/session-trim.test.ts +1 -1
- package/src/context/global-sync/session-trim.ts +1 -1
- package/src/context/global-sync/types.ts +1 -1
- package/src/context/global-sync/utils.ts +1 -1
- package/src/context/global-sync.tsx +3 -3
- package/src/context/highlights.tsx +2 -2
- package/src/context/language.tsx +18 -18
- package/src/context/layout.tsx +2 -2
- package/src/context/local.tsx +2 -2
- package/src/context/models.tsx +1 -1
- package/src/context/notification.tsx +4 -4
- package/src/context/permission-auto-respond.test.ts +2 -2
- package/src/context/permission-auto-respond.ts +1 -1
- package/src/context/permission.tsx +2 -2
- package/src/context/platform.tsx +1 -1
- package/src/context/prompt.tsx +2 -2
- package/src/context/sdk.tsx +2 -2
- package/src/context/server.tsx +1 -1
- package/src/context/settings.tsx +1 -1
- package/src/context/sync-optimistic.test.ts +1 -1
- package/src/context/sync.tsx +4 -4
- package/src/context/terminal.test.ts +1 -1
- package/src/context/terminal.tsx +1 -1
- package/src/entry.tsx +1 -1
- package/src/hooks/use-providers.ts +3 -3
- package/src/i18n/ar.ts +26 -26
- package/src/i18n/br.ts +26 -26
- package/src/i18n/bs.ts +26 -26
- package/src/i18n/da.ts +26 -26
- package/src/i18n/de.ts +26 -26
- package/src/i18n/en.ts +26 -26
- package/src/i18n/es.ts +26 -26
- package/src/i18n/fr.ts +26 -26
- package/src/i18n/ja.ts +26 -26
- package/src/i18n/ko.ts +26 -26
- package/src/i18n/no.ts +26 -26
- package/src/i18n/pl.ts +26 -26
- package/src/i18n/ru.ts +26 -26
- package/src/i18n/th.ts +26 -26
- package/src/i18n/tr.ts +26 -26
- package/src/i18n/zh.ts +25 -25
- package/src/i18n/zht.ts +25 -25
- package/src/index.css +1 -1
- package/src/pages/directory-layout.tsx +3 -3
- package/src/pages/error.tsx +4 -4
- package/src/pages/home.tsx +5 -5
- package/src/pages/layout/deep-links.ts +2 -2
- package/src/pages/layout/helpers.test.ts +20 -20
- package/src/pages/layout/helpers.ts +2 -2
- package/src/pages/layout/inline-editor.tsx +1 -1
- package/src/pages/layout/sidebar-items.tsx +10 -10
- package/src/pages/layout/sidebar-project.tsx +5 -5
- package/src/pages/layout/sidebar-shell.tsx +2 -2
- package/src/pages/layout/sidebar-workspace.tsx +10 -10
- package/src/pages/layout.tsx +14 -14
- package/src/pages/session/composer/session-composer-region.tsx +1 -1
- package/src/pages/session/composer/session-composer-state.test.ts +1 -1
- package/src/pages/session/composer/session-composer-state.ts +2 -2
- package/src/pages/session/composer/session-followup-dock.tsx +3 -3
- package/src/pages/session/composer/session-permission-dock.tsx +4 -4
- package/src/pages/session/composer/session-question-dock.tsx +5 -5
- package/src/pages/session/composer/session-request-tree.ts +1 -1
- package/src/pages/session/composer/session-revert-dock.tsx +3 -3
- package/src/pages/session/composer/session-todo-dock.tsx +8 -8
- package/src/pages/session/file-tabs.tsx +10 -10
- package/src/pages/session/message-timeline.tsx +16 -16
- package/src/pages/session/review-tab.tsx +3 -3
- package/src/pages/session/session-model-helpers.test.ts +1 -1
- package/src/pages/session/session-model-helpers.ts +1 -1
- package/src/pages/session/session-side-panel.tsx +6 -6
- package/src/pages/session/terminal-panel.tsx +4 -4
- package/src/pages/session/use-session-commands.tsx +5 -5
- package/src/pages/session/use-session-hash-scroll.ts +1 -1
- package/src/pages/session.tsx +10 -10
- package/src/testing/session-composer.ts +2 -2
- package/src/theme-preload.test.ts +8 -8
- package/src/utils/base64.ts +1 -1
- package/src/utils/persist.test.ts +11 -11
- package/src/utils/persist.ts +4 -4
- package/src/utils/prompt.test.ts +1 -1
- package/src/utils/prompt.ts +1 -1
- package/src/utils/server-errors.test.ts +2 -2
- package/src/utils/server.ts +2 -2
- package/src/utils/sound.ts +45 -45
- package/src/utils/worktree.test.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type HexColor, resolveThemeVariant, useTheme, withAlpha } from "
|
|
2
|
-
import { showToast } from "
|
|
1
|
+
import { type HexColor, resolveThemeVariant, useTheme, withAlpha } from "reigncode-ui/theme"
|
|
2
|
+
import { showToast } from "reigncode-ui/toast"
|
|
3
3
|
import type { FitAddon, Ghostty, Terminal as Term } from "ghostty-web"
|
|
4
4
|
import { type ComponentProps, createEffect, createMemo, onCleanup, onMount, splitProps } from "solid-js"
|
|
5
5
|
import { SerializeAddon } from "@/addons/serialize"
|
|
@@ -169,7 +169,7 @@ export const Terminal = (props: TerminalProps) => {
|
|
|
169
169
|
const client = sdk.client
|
|
170
170
|
const url = sdk.url
|
|
171
171
|
const auth = server.current?.http
|
|
172
|
-
const username = auth?.username ?? "
|
|
172
|
+
const username = auth?.username ?? "reigncode"
|
|
173
173
|
const password = auth?.password ?? ""
|
|
174
174
|
let container!: HTMLDivElement
|
|
175
175
|
const [local, others] = splitProps(props, ["pty", "class", "classList", "autoFocus", "onConnect", "onConnectError"])
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createEffect, createMemo, onCleanup, Show, untrack } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
3
|
import { useLocation, useNavigate, useParams } from "@solidjs/router"
|
|
4
|
-
import { IconButton } from "
|
|
5
|
-
import { Icon } from "
|
|
6
|
-
import { Button } from "
|
|
7
|
-
import { Tooltip, TooltipKeybind } from "
|
|
8
|
-
import { useTheme } from "
|
|
4
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
5
|
+
import { Icon } from "reigncode-ui/icon"
|
|
6
|
+
import { Button } from "reigncode-ui/button"
|
|
7
|
+
import { Tooltip, TooltipKeybind } from "reigncode-ui/tooltip"
|
|
8
|
+
import { useTheme } from "reigncode-ui/theme"
|
|
9
9
|
|
|
10
10
|
import { useLayout } from "@/context/layout"
|
|
11
11
|
import { usePlatform } from "@/context/platform"
|
|
@@ -286,11 +286,11 @@ export function Titlebar() {
|
|
|
286
286
|
</Show>
|
|
287
287
|
</div>
|
|
288
288
|
</div>
|
|
289
|
-
<div id="
|
|
289
|
+
<div id="reigncode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" />
|
|
290
290
|
</div>
|
|
291
291
|
|
|
292
292
|
<div class="min-w-0 flex items-center justify-center pointer-events-none">
|
|
293
|
-
<div id="
|
|
293
|
+
<div id="reigncode-titlebar-center" class="pointer-events-auto min-w-0 flex justify-center w-fit max-w-full" />
|
|
294
294
|
</div>
|
|
295
295
|
|
|
296
296
|
<div
|
|
@@ -301,7 +301,7 @@ export function Titlebar() {
|
|
|
301
301
|
data-tauri-drag-region
|
|
302
302
|
onMouseDown={drag}
|
|
303
303
|
>
|
|
304
|
-
<div id="
|
|
304
|
+
<div id="reigncode-titlebar-right" class="flex items-center gap-1 shrink-0 justify-end" />
|
|
305
305
|
<Show when={windows()}>
|
|
306
306
|
{!tauriApi() && <div class="w-36 shrink-0" />}
|
|
307
307
|
<div data-tauri-decorum-tb class="flex flex-row" />
|
package/src/context/command.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSimpleContext } from "
|
|
2
|
-
import { useDialog } from "
|
|
1
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
2
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
3
3
|
import { type Accessor, createEffect, createMemo, onCleanup, onMount } from "solid-js"
|
|
4
4
|
import { createStore } from "solid-js/store"
|
|
5
5
|
import { useLanguage } from "@/context/language"
|
|
@@ -9,7 +9,7 @@ beforeAll(async () => {
|
|
|
9
9
|
useNavigate: () => () => undefined,
|
|
10
10
|
useParams: () => ({}),
|
|
11
11
|
}))
|
|
12
|
-
mock.module("
|
|
12
|
+
mock.module("reigncode-ui/context", () => ({
|
|
13
13
|
createSimpleContext: () => ({
|
|
14
14
|
use: () => undefined,
|
|
15
15
|
provider: () => undefined,
|
package/src/context/comments.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { batch, createMemo, createRoot, onCleanup } from "solid-js"
|
|
2
2
|
import { createStore, reconcile, type SetStoreFunction, type Store } from "solid-js/store"
|
|
3
|
-
import { createSimpleContext } from "
|
|
3
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
4
4
|
import { useParams } from "@solidjs/router"
|
|
5
5
|
import { Persist, persisted } from "@/utils/persist"
|
|
6
6
|
import { createScopedCache } from "@/utils/scoped-cache"
|
|
@@ -86,12 +86,12 @@ describe("encodeFilePath", () => {
|
|
|
86
86
|
|
|
87
87
|
describe("macOS paths", () => {
|
|
88
88
|
test("should handle macOS absolute path", () => {
|
|
89
|
-
const macPath = "/Users/kelvin/Projects/
|
|
89
|
+
const macPath = "/Users/kelvin/Projects/reigncode/README.md"
|
|
90
90
|
const result = encodeFilePath(macPath)
|
|
91
91
|
const fileUrl = `file://${result}`
|
|
92
92
|
|
|
93
93
|
expect(() => new URL(fileUrl)).not.toThrow()
|
|
94
|
-
expect(result).toBe("/Users/kelvin/Projects/
|
|
94
|
+
expect(result).toBe("/Users/kelvin/Projects/reigncode/README.md")
|
|
95
95
|
})
|
|
96
96
|
|
|
97
97
|
test("should handle macOS path with spaces", () => {
|
|
@@ -106,7 +106,7 @@ describe("encodeFilePath", () => {
|
|
|
106
106
|
|
|
107
107
|
describe("Windows paths", () => {
|
|
108
108
|
test("should handle Windows absolute path with backslashes", () => {
|
|
109
|
-
const windowsPath = "D:\\dev\\projects\\
|
|
109
|
+
const windowsPath = "D:\\dev\\projects\\reigncode\\README.bs.md"
|
|
110
110
|
const result = encodeFilePath(windowsPath)
|
|
111
111
|
const fileUrl = `file://${result}`
|
|
112
112
|
|
|
@@ -116,7 +116,7 @@ describe("encodeFilePath", () => {
|
|
|
116
116
|
const url = new URL(fileUrl)
|
|
117
117
|
expect(url.protocol).toBe("file:")
|
|
118
118
|
expect(url.pathname).toContain("README.bs.md")
|
|
119
|
-
expect(result).toBe("/D:/dev/projects/
|
|
119
|
+
expect(result).toBe("/D:/dev/projects/reigncode/README.bs.md")
|
|
120
120
|
})
|
|
121
121
|
|
|
122
122
|
test("should handle mixed separator path (Windows + Unix)", () => {
|
|
@@ -126,7 +126,7 @@ describe("encodeFilePath", () => {
|
|
|
126
126
|
const fileUrl = `file://${result}`
|
|
127
127
|
|
|
128
128
|
expect(() => new URL(fileUrl)).not.toThrow()
|
|
129
|
-
expect(result).toBe("/D:/dev/projects/
|
|
129
|
+
expect(result).toBe("/D:/dev/projects/reigncode/README.bs.md")
|
|
130
130
|
})
|
|
131
131
|
|
|
132
132
|
test("should handle Windows path with spaces", () => {
|
|
@@ -167,7 +167,7 @@ describe("encodeFilePath", () => {
|
|
|
167
167
|
|
|
168
168
|
test("should NOT create invalid URL like the bug report", () => {
|
|
169
169
|
// This is the exact scenario from bug report by @alexyaroshuk
|
|
170
|
-
const windowsPath = "D:\\dev\\projects\\
|
|
170
|
+
const windowsPath = "D:\\dev\\projects\\reigncode\\README.bs.md"
|
|
171
171
|
const result = encodeFilePath(windowsPath)
|
|
172
172
|
const fileUrl = `file://${result}`
|
|
173
173
|
|
package/src/context/file.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { batch, createEffect, createMemo, onCleanup } from "solid-js"
|
|
2
2
|
import { createStore, produce, reconcile } from "solid-js/store"
|
|
3
|
-
import { createSimpleContext } from "
|
|
4
|
-
import { showToast } from "
|
|
3
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
4
|
+
import { showToast } from "reigncode-ui/toast"
|
|
5
5
|
import { useParams } from "@solidjs/router"
|
|
6
|
-
import { getFilename } from "
|
|
6
|
+
import { getFilename } from "reigncode-util/path"
|
|
7
7
|
import { useSDK } from "./sdk"
|
|
8
8
|
import { useSync } from "./sync"
|
|
9
9
|
import { useLanguage } from "@/context/language"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Event } from "
|
|
2
|
-
import { createSimpleContext } from "
|
|
1
|
+
import type { Event } from "reigncode-sdk/v2/client"
|
|
2
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
3
3
|
import { createGlobalEmitter } from "@solid-primitives/event-bus"
|
|
4
4
|
import { batch, onCleanup } from "solid-js"
|
|
5
5
|
import z from "zod"
|
|
@@ -8,10 +8,10 @@ import type {
|
|
|
8
8
|
ProviderListResponse,
|
|
9
9
|
QuestionRequest,
|
|
10
10
|
Todo,
|
|
11
|
-
} from "
|
|
12
|
-
import { showToast } from "
|
|
13
|
-
import { getFilename } from "
|
|
14
|
-
import { retry } from "
|
|
11
|
+
} from "reigncode-sdk/v2/client"
|
|
12
|
+
import { showToast } from "reigncode-ui/toast"
|
|
13
|
+
import { getFilename } from "reigncode-util/path"
|
|
14
|
+
import { retry } from "reigncode-util/retry"
|
|
15
15
|
import { batch } from "solid-js"
|
|
16
16
|
import { reconcile, type SetStoreFunction, type Store } from "solid-js/store"
|
|
17
17
|
import type { State, VcsCache } from "./types"
|
|
@@ -69,7 +69,7 @@ export async function bootstrapGlobal(input: {
|
|
|
69
69
|
input.globalSDK.project.list().then((x) => {
|
|
70
70
|
const projects = (x.data ?? [])
|
|
71
71
|
.filter((p) => !!p?.id)
|
|
72
|
-
.filter((p) => !!p.worktree && !p.worktree.includes("
|
|
72
|
+
.filter((p) => !!p.worktree && !p.worktree.includes("reigncode-test"))
|
|
73
73
|
.slice()
|
|
74
74
|
.sort((a, b) => cmp(a.id, b.id))
|
|
75
75
|
input.setGlobalStore("project", projects)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRoot, getOwner, onCleanup, runWithOwner, type Owner } from "solid-js"
|
|
2
2
|
import { createStore, type SetStoreFunction, type Store } from "solid-js/store"
|
|
3
3
|
import { Persist, persisted } from "@/utils/persist"
|
|
4
|
-
import type { VcsInfo } from "
|
|
4
|
+
import type { VcsInfo } from "reigncode-sdk/v2/client"
|
|
5
5
|
import {
|
|
6
6
|
DIR_IDLE_TTL_MS,
|
|
7
7
|
MAX_DIR_STORES,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
|
-
import type { Message, Part, PermissionRequest, Project, QuestionRequest, Session } from "
|
|
2
|
+
import type { Message, Part, PermissionRequest, Project, QuestionRequest, Session } from "reigncode-sdk/v2/client"
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
4
|
import type { State } from "./types"
|
|
5
5
|
import { applyDirectoryEvent, applyGlobalEvent, cleanupDroppedSessionCaches } from "./event-reducer"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Binary } from "
|
|
1
|
+
import { Binary } from "reigncode-util/binary"
|
|
2
2
|
import { produce, reconcile, type SetStoreFunction, type Store } from "solid-js/store"
|
|
3
3
|
import type {
|
|
4
4
|
FileDiff,
|
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
Session,
|
|
11
11
|
SessionStatus,
|
|
12
12
|
Todo,
|
|
13
|
-
} from "
|
|
13
|
+
} from "reigncode-sdk/v2/client"
|
|
14
14
|
import type { State, VcsCache } from "./types"
|
|
15
15
|
import { trimSessions } from "./session-trim"
|
|
16
16
|
import { dropSessionCaches } from "./session-cache"
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
QuestionRequest,
|
|
8
8
|
SessionStatus,
|
|
9
9
|
Todo,
|
|
10
|
-
} from "
|
|
10
|
+
} from "reigncode-sdk/v2/client"
|
|
11
11
|
import { dropSessionCaches, pickSessionCacheEvictions } from "./session-cache"
|
|
12
12
|
|
|
13
13
|
const msg = (id: string, sessionID: string) =>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
|
-
import type { PermissionRequest, Session } from "
|
|
2
|
+
import type { PermissionRequest, Session } from "reigncode-sdk/v2/client"
|
|
3
3
|
import { trimSessions } from "./session-trim"
|
|
4
4
|
|
|
5
5
|
const session = (input: { id: string; parentID?: string; created: number; updated?: number; archived?: number }) =>
|
|
@@ -6,9 +6,9 @@ import type {
|
|
|
6
6
|
ProviderAuthResponse,
|
|
7
7
|
ProviderListResponse,
|
|
8
8
|
Todo,
|
|
9
|
-
} from "
|
|
10
|
-
import { showToast } from "
|
|
11
|
-
import { getFilename } from "
|
|
9
|
+
} from "reigncode-sdk/v2/client"
|
|
10
|
+
import { showToast } from "reigncode-ui/toast"
|
|
11
|
+
import { getFilename } from "reigncode-util/path"
|
|
12
12
|
import {
|
|
13
13
|
createContext,
|
|
14
14
|
getOwner,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createEffect, onCleanup } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { createSimpleContext } from "
|
|
4
|
-
import { useDialog } from "
|
|
3
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
4
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
5
5
|
import { usePlatform } from "@/context/platform"
|
|
6
6
|
import { useSettings } from "@/context/settings"
|
|
7
7
|
import { persisted } from "@/utils/persist"
|
package/src/context/language.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i18n from "@solid-primitives/i18n"
|
|
2
2
|
import { createEffect, createMemo } from "solid-js"
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
|
-
import { createSimpleContext } from "
|
|
4
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
5
5
|
import { Persist, persisted } from "@/utils/persist"
|
|
6
6
|
import { dict as en } from "@/i18n/en"
|
|
7
7
|
import { dict as zh } from "@/i18n/zh"
|
|
@@ -20,23 +20,23 @@ import { dict as br } from "@/i18n/br"
|
|
|
20
20
|
import { dict as th } from "@/i18n/th"
|
|
21
21
|
import { dict as bs } from "@/i18n/bs"
|
|
22
22
|
import { dict as tr } from "@/i18n/tr"
|
|
23
|
-
import { dict as uiEn } from "
|
|
24
|
-
import { dict as uiZh } from "
|
|
25
|
-
import { dict as uiZht } from "
|
|
26
|
-
import { dict as uiKo } from "
|
|
27
|
-
import { dict as uiDe } from "
|
|
28
|
-
import { dict as uiEs } from "
|
|
29
|
-
import { dict as uiFr } from "
|
|
30
|
-
import { dict as uiDa } from "
|
|
31
|
-
import { dict as uiJa } from "
|
|
32
|
-
import { dict as uiPl } from "
|
|
33
|
-
import { dict as uiRu } from "
|
|
34
|
-
import { dict as uiAr } from "
|
|
35
|
-
import { dict as uiNo } from "
|
|
36
|
-
import { dict as uiBr } from "
|
|
37
|
-
import { dict as uiTh } from "
|
|
38
|
-
import { dict as uiBs } from "
|
|
39
|
-
import { dict as uiTr } from "
|
|
23
|
+
import { dict as uiEn } from "reigncode-ui/i18n/en"
|
|
24
|
+
import { dict as uiZh } from "reigncode-ui/i18n/zh"
|
|
25
|
+
import { dict as uiZht } from "reigncode-ui/i18n/zht"
|
|
26
|
+
import { dict as uiKo } from "reigncode-ui/i18n/ko"
|
|
27
|
+
import { dict as uiDe } from "reigncode-ui/i18n/de"
|
|
28
|
+
import { dict as uiEs } from "reigncode-ui/i18n/es"
|
|
29
|
+
import { dict as uiFr } from "reigncode-ui/i18n/fr"
|
|
30
|
+
import { dict as uiDa } from "reigncode-ui/i18n/da"
|
|
31
|
+
import { dict as uiJa } from "reigncode-ui/i18n/ja"
|
|
32
|
+
import { dict as uiPl } from "reigncode-ui/i18n/pl"
|
|
33
|
+
import { dict as uiRu } from "reigncode-ui/i18n/ru"
|
|
34
|
+
import { dict as uiAr } from "reigncode-ui/i18n/ar"
|
|
35
|
+
import { dict as uiNo } from "reigncode-ui/i18n/no"
|
|
36
|
+
import { dict as uiBr } from "reigncode-ui/i18n/br"
|
|
37
|
+
import { dict as uiTh } from "reigncode-ui/i18n/th"
|
|
38
|
+
import { dict as uiBs } from "reigncode-ui/i18n/bs"
|
|
39
|
+
import { dict as uiTr } from "reigncode-ui/i18n/tr"
|
|
40
40
|
|
|
41
41
|
export type Locale =
|
|
42
42
|
| "en"
|
package/src/context/layout.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createStore, produce } from "solid-js/store"
|
|
2
2
|
import { batch, createEffect, createMemo, onCleanup, onMount, type Accessor } from "solid-js"
|
|
3
|
-
import { createSimpleContext } from "
|
|
3
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
4
4
|
import { useGlobalSync } from "./global-sync"
|
|
5
5
|
import { useGlobalSDK } from "./global-sdk"
|
|
6
6
|
import { useServer } from "./server"
|
|
7
7
|
import { usePlatform } from "./platform"
|
|
8
|
-
import { Project } from "
|
|
8
|
+
import { Project } from "reigncode-sdk/v2"
|
|
9
9
|
import { Persist, persisted, removePersisted } from "@/utils/persist"
|
|
10
10
|
import { decode64 } from "@/utils/base64"
|
|
11
11
|
import { same } from "@/utils/same"
|
package/src/context/local.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSimpleContext } from "
|
|
2
|
-
import { base64Encode } from "
|
|
1
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
2
|
+
import { base64Encode } from "reigncode-util/encode"
|
|
3
3
|
import { useParams } from "@solidjs/router"
|
|
4
4
|
import { batch, createEffect, createMemo, onCleanup } from "solid-js"
|
|
5
5
|
import { createStore } from "solid-js/store"
|
package/src/context/models.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { createMemo } from "solid-js"
|
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
3
|
import { DateTime } from "luxon"
|
|
4
4
|
import { filter, firstBy, flat, groupBy, mapValues, pipe, uniqueBy, values } from "remeda"
|
|
5
|
-
import { createSimpleContext } from "
|
|
5
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
6
6
|
import { useProviders } from "@/hooks/use-providers"
|
|
7
7
|
import { Persist, persisted } from "@/utils/persist"
|
|
8
8
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createStore, reconcile } from "solid-js/store"
|
|
2
2
|
import { batch, createEffect, createMemo, onCleanup } from "solid-js"
|
|
3
3
|
import { useParams } from "@solidjs/router"
|
|
4
|
-
import { createSimpleContext } from "
|
|
4
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
5
5
|
import { useGlobalSDK } from "./global-sdk"
|
|
6
6
|
import { useGlobalSync } from "./global-sync"
|
|
7
7
|
import { usePlatform } from "@/context/platform"
|
|
8
8
|
import { useLanguage } from "@/context/language"
|
|
9
9
|
import { useSettings } from "@/context/settings"
|
|
10
|
-
import { Binary } from "
|
|
11
|
-
import { base64Encode } from "
|
|
10
|
+
import { Binary } from "reigncode-util/binary"
|
|
11
|
+
import { base64Encode } from "reigncode-util/encode"
|
|
12
12
|
import { decode64 } from "@/utils/base64"
|
|
13
|
-
import { EventSessionError } from "
|
|
13
|
+
import { EventSessionError } from "reigncode-sdk/v2"
|
|
14
14
|
import { Persist, persisted } from "@/utils/persist"
|
|
15
15
|
import { playSound, soundSrc } from "@/utils/sound"
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
|
-
import type { PermissionRequest, Session } from "
|
|
3
|
-
import { base64Encode } from "
|
|
2
|
+
import type { PermissionRequest, Session } from "reigncode-sdk/v2/client"
|
|
3
|
+
import { base64Encode } from "reigncode-util/encode"
|
|
4
4
|
import { autoRespondsPermission, isDirectoryAutoAccepting } from "./permission-auto-respond"
|
|
5
5
|
|
|
6
6
|
const session = (input: { id: string; parentID?: string }) =>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createEffect, createMemo, onCleanup } from "solid-js"
|
|
2
2
|
import { createStore, produce } from "solid-js/store"
|
|
3
|
-
import { createSimpleContext } from "
|
|
4
|
-
import type { PermissionRequest } from "
|
|
3
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
4
|
+
import type { PermissionRequest } from "reigncode-sdk/v2/client"
|
|
5
5
|
import { Persist, persisted } from "@/utils/persist"
|
|
6
6
|
import { useGlobalSDK } from "@/context/global-sdk"
|
|
7
7
|
import { useGlobalSync } from "./global-sync"
|
package/src/context/platform.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSimpleContext } from "
|
|
1
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
2
2
|
import type { AsyncStorage, SyncStorage } from "@solid-primitives/storage"
|
|
3
3
|
import type { Accessor } from "solid-js"
|
|
4
4
|
import { ServerConnection } from "./server"
|
package/src/context/prompt.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSimpleContext } from "
|
|
2
|
-
import { checksum } from "
|
|
1
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
2
|
+
import { checksum } from "reigncode-util/encode"
|
|
3
3
|
import { useParams } from "@solidjs/router"
|
|
4
4
|
import { batch, createMemo, createRoot, getOwner, onCleanup } from "solid-js"
|
|
5
5
|
import { createStore, type SetStoreFunction } from "solid-js/store"
|
package/src/context/sdk.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Event } from "
|
|
2
|
-
import { createSimpleContext } from "
|
|
1
|
+
import type { Event } from "reigncode-sdk/v2/client"
|
|
2
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
3
3
|
import { createGlobalEmitter } from "@solid-primitives/event-bus"
|
|
4
4
|
import { type Accessor, createEffect, createMemo, onCleanup } from "solid-js"
|
|
5
5
|
import { useGlobalSDK } from "./global-sdk"
|
package/src/context/server.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSimpleContext } from "
|
|
1
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
2
2
|
import { type Accessor, batch, createEffect, createMemo, onCleanup } from "solid-js"
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
4
|
import { Persist, persisted } from "@/utils/persist"
|
package/src/context/settings.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createStore, reconcile } from "solid-js/store"
|
|
2
2
|
import { createEffect, createMemo } from "solid-js"
|
|
3
|
-
import { createSimpleContext } from "
|
|
3
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
4
4
|
import { persisted } from "@/utils/persist"
|
|
5
5
|
|
|
6
6
|
export interface NotificationSettings {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
|
-
import type { Message, Part } from "
|
|
2
|
+
import type { Message, Part } from "reigncode-sdk/v2/client"
|
|
3
3
|
import { applyOptimisticAdd, applyOptimisticRemove, mergeOptimisticPage } from "./sync"
|
|
4
4
|
|
|
5
5
|
type Text = Extract<Part, { type: "text" }>
|
package/src/context/sync.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { batch, createMemo } from "solid-js"
|
|
2
2
|
import { createStore, produce, reconcile } from "solid-js/store"
|
|
3
|
-
import { Binary } from "
|
|
4
|
-
import { retry } from "
|
|
5
|
-
import { createSimpleContext } from "
|
|
3
|
+
import { Binary } from "reigncode-util/binary"
|
|
4
|
+
import { retry } from "reigncode-util/retry"
|
|
5
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
6
6
|
import {
|
|
7
7
|
clearSessionPrefetch,
|
|
8
8
|
getSessionPrefetch,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./global-sync/session-prefetch"
|
|
12
12
|
import { useGlobalSync } from "./global-sync"
|
|
13
13
|
import { useSDK } from "./sdk"
|
|
14
|
-
import type { Message, Part } from "
|
|
14
|
+
import type { Message, Part } from "reigncode-sdk/v2/client"
|
|
15
15
|
import { SESSION_CACHE_LIMIT, dropSessionCaches, pickSessionCacheEvictions } from "./global-sync/session-cache"
|
|
16
16
|
|
|
17
17
|
const SKIP_PARTS = new Set(["patch", "step-start", "step-finish"])
|
|
@@ -9,7 +9,7 @@ beforeAll(async () => {
|
|
|
9
9
|
useNavigate: () => () => undefined,
|
|
10
10
|
useParams: () => ({}),
|
|
11
11
|
}))
|
|
12
|
-
mock.module("
|
|
12
|
+
mock.module("reigncode-ui/context", () => ({
|
|
13
13
|
createSimpleContext: () => ({
|
|
14
14
|
use: () => undefined,
|
|
15
15
|
provider: () => undefined,
|
package/src/context/terminal.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createStore, produce } from "solid-js/store"
|
|
2
|
-
import { createSimpleContext } from "
|
|
2
|
+
import { createSimpleContext } from "reigncode-ui/context"
|
|
3
3
|
import { batch, createEffect, createMemo, createRoot, on, onCleanup } from "solid-js"
|
|
4
4
|
import { useParams } from "@solidjs/router"
|
|
5
5
|
import { useSDK } from "./sdk"
|
package/src/entry.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import { handleNotificationClick } from "@/utils/notification-click"
|
|
|
9
9
|
import pkg from "../package.json"
|
|
10
10
|
import { ServerConnection } from "./context/server"
|
|
11
11
|
|
|
12
|
-
const DEFAULT_SERVER_URL_KEY = "
|
|
12
|
+
const DEFAULT_SERVER_URL_KEY = "reigncode.settings.dat:defaultServerUrl"
|
|
13
13
|
|
|
14
14
|
const getLocale = () => {
|
|
15
15
|
if (typeof navigator !== "object") return "en" as const
|
|
@@ -4,8 +4,8 @@ import { useParams } from "@solidjs/router"
|
|
|
4
4
|
import { createMemo } from "solid-js"
|
|
5
5
|
|
|
6
6
|
export const popularProviders = [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"reigncode",
|
|
8
|
+
"reigncode-go",
|
|
9
9
|
"anthropic",
|
|
10
10
|
"github-copilot",
|
|
11
11
|
"openai",
|
|
@@ -37,7 +37,7 @@ export function useProviders() {
|
|
|
37
37
|
paid: () => {
|
|
38
38
|
const connected = new Set(providers().connected)
|
|
39
39
|
return providers().all.filter(
|
|
40
|
-
(p) => connected.has(p.id) && (p.id !== "
|
|
40
|
+
(p) => connected.has(p.id) && (p.id !== "reigncode" || Object.values(p.models).some((m) => m.cost?.input)),
|
|
41
41
|
)
|
|
42
42
|
},
|
|
43
43
|
}
|