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
package/src/pages/layout.tsx
CHANGED
|
@@ -16,23 +16,23 @@ import { useNavigate, useParams } from "@solidjs/router"
|
|
|
16
16
|
import { useLayout, LocalProject } from "@/context/layout"
|
|
17
17
|
import { useGlobalSync } from "@/context/global-sync"
|
|
18
18
|
import { Persist, persisted } from "@/utils/persist"
|
|
19
|
-
import { base64Encode } from "
|
|
19
|
+
import { base64Encode } from "reigncode-util/encode"
|
|
20
20
|
import { decode64 } from "@/utils/base64"
|
|
21
|
-
import { ResizeHandle } from "
|
|
22
|
-
import { Button } from "
|
|
23
|
-
import { IconButton } from "
|
|
24
|
-
import { Tooltip } from "
|
|
25
|
-
import { DropdownMenu } from "
|
|
26
|
-
import { Dialog } from "
|
|
27
|
-
import { getFilename } from "
|
|
28
|
-
import { Session, type Message } from "
|
|
21
|
+
import { ResizeHandle } from "reigncode-ui/resize-handle"
|
|
22
|
+
import { Button } from "reigncode-ui/button"
|
|
23
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
24
|
+
import { Tooltip } from "reigncode-ui/tooltip"
|
|
25
|
+
import { DropdownMenu } from "reigncode-ui/dropdown-menu"
|
|
26
|
+
import { Dialog } from "reigncode-ui/dialog"
|
|
27
|
+
import { getFilename } from "reigncode-util/path"
|
|
28
|
+
import { Session, type Message } from "reigncode-sdk/v2/client"
|
|
29
29
|
import { usePlatform } from "@/context/platform"
|
|
30
30
|
import { useSettings } from "@/context/settings"
|
|
31
31
|
import { createStore, produce, reconcile } from "solid-js/store"
|
|
32
32
|
import { DragDropProvider, DragDropSensors, DragOverlay, SortableProvider, closestCenter } from "@thisbeyond/solid-dnd"
|
|
33
33
|
import type { DragEvent } from "@thisbeyond/solid-dnd"
|
|
34
34
|
import { useProviders } from "@/hooks/use-providers"
|
|
35
|
-
import { showToast, Toast, toaster } from "
|
|
35
|
+
import { showToast, Toast, toaster } from "reigncode-ui/toast"
|
|
36
36
|
import { useGlobalSDK } from "@/context/global-sdk"
|
|
37
37
|
import { clearWorkspaceTerminals } from "@/context/terminal"
|
|
38
38
|
import { dropSessionCaches, pickSessionCacheEvictions } from "@/context/global-sync/session-cache"
|
|
@@ -47,16 +47,16 @@ import {
|
|
|
47
47
|
} from "@/context/global-sync/session-prefetch"
|
|
48
48
|
import { useNotification } from "@/context/notification"
|
|
49
49
|
import { usePermission } from "@/context/permission"
|
|
50
|
-
import { Binary } from "
|
|
51
|
-
import { retry } from "
|
|
50
|
+
import { Binary } from "reigncode-util/binary"
|
|
51
|
+
import { retry } from "reigncode-util/retry"
|
|
52
52
|
import { playSound, soundSrc } from "@/utils/sound"
|
|
53
53
|
import { createAim } from "@/utils/aim"
|
|
54
54
|
import { setNavigate } from "@/utils/notification-click"
|
|
55
55
|
import { Worktree as WorktreeState } from "@/utils/worktree"
|
|
56
56
|
import { setSessionHandoff } from "@/pages/session/handoff"
|
|
57
57
|
|
|
58
|
-
import { useDialog } from "
|
|
59
|
-
import { useTheme, type ColorScheme } from "
|
|
58
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
59
|
+
import { useTheme, type ColorScheme } from "reigncode-ui/theme"
|
|
60
60
|
import { DialogSelectProvider } from "@/components/dialog-select-provider"
|
|
61
61
|
import { DialogSelectServer } from "@/components/dialog-select-server"
|
|
62
62
|
import { DialogSettings } from "@/components/dialog-settings"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Show, createEffect, createMemo, onCleanup } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { useSpring } from "
|
|
3
|
+
import { useSpring } from "reigncode-ui/motion-spring"
|
|
4
4
|
import { PromptInput } from "@/components/prompt-input"
|
|
5
5
|
import { useLanguage } from "@/context/language"
|
|
6
6
|
import { usePrompt } from "@/context/prompt"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
|
-
import type { PermissionRequest, QuestionRequest, Session } from "
|
|
2
|
+
import type { PermissionRequest, QuestionRequest, Session } from "reigncode-sdk/v2/client"
|
|
3
3
|
import { todoState } from "./session-composer-state"
|
|
4
4
|
import { sessionPermissionRequest, sessionQuestionRequest } from "./session-request-tree"
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createEffect, createMemo, on, onCleanup, onMount } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import type { PermissionRequest, QuestionRequest, Todo } from "
|
|
3
|
+
import type { PermissionRequest, QuestionRequest, Todo } from "reigncode-sdk/v2"
|
|
4
4
|
import { useParams } from "@solidjs/router"
|
|
5
|
-
import { showToast } from "
|
|
5
|
+
import { showToast } from "reigncode-ui/toast"
|
|
6
6
|
import { useGlobalSync } from "@/context/global-sync"
|
|
7
7
|
import { useLanguage } from "@/context/language"
|
|
8
8
|
import { usePermission } from "@/context/permission"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { For, Show, createMemo } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { DockTray } from "
|
|
5
|
-
import { IconButton } from "
|
|
3
|
+
import { Button } from "reigncode-ui/button"
|
|
4
|
+
import { DockTray } from "reigncode-ui/dock-surface"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
6
|
import { useLanguage } from "@/context/language"
|
|
7
7
|
|
|
8
8
|
export function SessionFollowupDock(props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { For, Show } from "solid-js"
|
|
2
|
-
import type { PermissionRequest } from "
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { DockPrompt } from "
|
|
5
|
-
import { Icon } from "
|
|
2
|
+
import type { PermissionRequest } from "reigncode-sdk/v2"
|
|
3
|
+
import { Button } from "reigncode-ui/button"
|
|
4
|
+
import { DockPrompt } from "reigncode-ui/dock-prompt"
|
|
5
|
+
import { Icon } from "reigncode-ui/icon"
|
|
6
6
|
import { useLanguage } from "@/context/language"
|
|
7
7
|
|
|
8
8
|
export function SessionPermissionDock(props: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { For, Show, createMemo, onCleanup, onMount, type Component } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
3
|
import { useMutation } from "@tanstack/solid-query"
|
|
4
|
-
import { Button } from "
|
|
5
|
-
import { DockPrompt } from "
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { showToast } from "
|
|
8
|
-
import type { QuestionAnswer, QuestionRequest } from "
|
|
4
|
+
import { Button } from "reigncode-ui/button"
|
|
5
|
+
import { DockPrompt } from "reigncode-ui/dock-prompt"
|
|
6
|
+
import { Icon } from "reigncode-ui/icon"
|
|
7
|
+
import { showToast } from "reigncode-ui/toast"
|
|
8
|
+
import type { QuestionAnswer, QuestionRequest } from "reigncode-sdk/v2"
|
|
9
9
|
import { useLanguage } from "@/context/language"
|
|
10
10
|
import { useSDK } from "@/context/sdk"
|
|
11
11
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { For, Show, createEffect, createMemo } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { DockTray } from "
|
|
5
|
-
import { IconButton } from "
|
|
3
|
+
import { Button } from "reigncode-ui/button"
|
|
4
|
+
import { DockTray } from "reigncode-ui/dock-surface"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
6
|
import { useLanguage } from "@/context/language"
|
|
7
7
|
|
|
8
8
|
export function SessionRevertDock(props: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Todo } from "
|
|
2
|
-
import { AnimatedNumber } from "
|
|
3
|
-
import { Checkbox } from "
|
|
4
|
-
import { DockTray } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { useSpring } from "
|
|
7
|
-
import { TextReveal } from "
|
|
8
|
-
import { TextStrikethrough } from "
|
|
1
|
+
import type { Todo } from "reigncode-sdk/v2"
|
|
2
|
+
import { AnimatedNumber } from "reigncode-ui/animated-number"
|
|
3
|
+
import { Checkbox } from "reigncode-ui/checkbox"
|
|
4
|
+
import { DockTray } from "reigncode-ui/dock-surface"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { useSpring } from "reigncode-ui/motion-spring"
|
|
7
|
+
import { TextReveal } from "reigncode-ui/text-reveal"
|
|
8
|
+
import { TextStrikethrough } from "reigncode-ui/text-strikethrough"
|
|
9
9
|
import { Index, createEffect, createMemo, on, onCleanup } from "solid-js"
|
|
10
10
|
import { createStore } from "solid-js/store"
|
|
11
11
|
import { composerEnabled, composerProbe } from "@/testing/session-composer"
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createEffect, createMemo, Match, on, onCleanup, Switch } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
3
|
import { Dynamic } from "solid-js/web"
|
|
4
|
-
import type { FileSearchHandle } from "
|
|
5
|
-
import { useFileComponent } from "
|
|
6
|
-
import { cloneSelectedLineRange, previewSelectedLines } from "
|
|
7
|
-
import { createLineCommentController } from "
|
|
8
|
-
import { sampledChecksum } from "
|
|
9
|
-
import { DropdownMenu } from "
|
|
10
|
-
import { IconButton } from "
|
|
11
|
-
import { Tabs } from "
|
|
12
|
-
import { ScrollView } from "
|
|
13
|
-
import { showToast } from "
|
|
4
|
+
import type { FileSearchHandle } from "reigncode-ui/file"
|
|
5
|
+
import { useFileComponent } from "reigncode-ui/context/file"
|
|
6
|
+
import { cloneSelectedLineRange, previewSelectedLines } from "reigncode-ui/pierre/selection-bridge"
|
|
7
|
+
import { createLineCommentController } from "reigncode-ui/line-comment-annotations"
|
|
8
|
+
import { sampledChecksum } from "reigncode-util/encode"
|
|
9
|
+
import { DropdownMenu } from "reigncode-ui/dropdown-menu"
|
|
10
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
11
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
12
|
+
import { ScrollView } from "reigncode-ui/scroll-view"
|
|
13
|
+
import { showToast } from "reigncode-ui/toast"
|
|
14
14
|
import { selectionFromLines, useFile, type FileSelection, type SelectedLineRange } from "@/context/file"
|
|
15
15
|
import { useComments } from "@/context/comments"
|
|
16
16
|
import { useLanguage } from "@/context/language"
|
|
@@ -2,25 +2,25 @@ import { For, createEffect, createMemo, on, onCleanup, Show, Index, type JSX, cr
|
|
|
2
2
|
import { createStore, produce } from "solid-js/store"
|
|
3
3
|
import { useNavigate } from "@solidjs/router"
|
|
4
4
|
import { useMutation } from "@tanstack/solid-query"
|
|
5
|
-
import { Button } from "
|
|
6
|
-
import { FileIcon } from "
|
|
7
|
-
import { Icon } from "
|
|
8
|
-
import { IconButton } from "
|
|
9
|
-
import { DropdownMenu } from "
|
|
10
|
-
import { Dialog } from "
|
|
11
|
-
import { InlineInput } from "
|
|
12
|
-
import { Spinner } from "
|
|
13
|
-
import { SessionTurn } from "
|
|
14
|
-
import { ScrollView } from "
|
|
15
|
-
import { TextField } from "
|
|
16
|
-
import type { AssistantMessage, Message as MessageType, Part, TextPart, UserMessage } from "
|
|
17
|
-
import { showToast } from "
|
|
18
|
-
import { Binary } from "
|
|
19
|
-
import { getFilename } from "
|
|
5
|
+
import { Button } from "reigncode-ui/button"
|
|
6
|
+
import { FileIcon } from "reigncode-ui/file-icon"
|
|
7
|
+
import { Icon } from "reigncode-ui/icon"
|
|
8
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
9
|
+
import { DropdownMenu } from "reigncode-ui/dropdown-menu"
|
|
10
|
+
import { Dialog } from "reigncode-ui/dialog"
|
|
11
|
+
import { InlineInput } from "reigncode-ui/inline-input"
|
|
12
|
+
import { Spinner } from "reigncode-ui/spinner"
|
|
13
|
+
import { SessionTurn } from "reigncode-ui/session-turn"
|
|
14
|
+
import { ScrollView } from "reigncode-ui/scroll-view"
|
|
15
|
+
import { TextField } from "reigncode-ui/text-field"
|
|
16
|
+
import type { AssistantMessage, Message as MessageType, Part, TextPart, UserMessage } from "reigncode-sdk/v2"
|
|
17
|
+
import { showToast } from "reigncode-ui/toast"
|
|
18
|
+
import { Binary } from "reigncode-util/binary"
|
|
19
|
+
import { getFilename } from "reigncode-util/path"
|
|
20
20
|
import { Popover as KobaltePopover } from "@kobalte/core/popover"
|
|
21
21
|
import { shouldMarkBoundaryGesture, normalizeWheelDelta } from "@/pages/session/message-gesture"
|
|
22
22
|
import { SessionContextUsage } from "@/components/session-context-usage"
|
|
23
|
-
import { useDialog } from "
|
|
23
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
24
24
|
import { useLanguage } from "@/context/language"
|
|
25
25
|
import { useSessionKey } from "@/pages/session/session-layout"
|
|
26
26
|
import { useGlobalSDK } from "@/context/global-sdk"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createEffect, onCleanup, type JSX } from "solid-js"
|
|
2
|
-
import type { FileDiff } from "
|
|
3
|
-
import { SessionReview } from "
|
|
2
|
+
import type { FileDiff } from "reigncode-sdk/v2"
|
|
3
|
+
import { SessionReview } from "reigncode-ui/session-review"
|
|
4
4
|
import type {
|
|
5
5
|
SessionReviewCommentActions,
|
|
6
6
|
SessionReviewCommentDelete,
|
|
7
7
|
SessionReviewCommentUpdate,
|
|
8
|
-
} from "
|
|
8
|
+
} from "reigncode-ui/session-review"
|
|
9
9
|
import type { SelectedLineRange } from "@/context/file"
|
|
10
10
|
import { useSDK } from "@/context/sdk"
|
|
11
11
|
import { useLayout } from "@/context/layout"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
|
-
import type { UserMessage } from "
|
|
2
|
+
import type { UserMessage } from "reigncode-sdk/v2"
|
|
3
3
|
import { resetSessionModel, syncSessionModel } from "./session-model-helpers"
|
|
4
4
|
|
|
5
5
|
const message = (input?: Partial<Pick<UserMessage, "agent" | "model" | "variant">>) =>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { For, Match, Show, Switch, createEffect, createMemo, onCleanup, type JSX } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
3
|
import { createMediaQuery } from "@solid-primitives/media"
|
|
4
|
-
import { Tabs } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { TooltipKeybind } from "
|
|
7
|
-
import { ResizeHandle } from "
|
|
8
|
-
import { Mark } from "
|
|
4
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { TooltipKeybind } from "reigncode-ui/tooltip"
|
|
7
|
+
import { ResizeHandle } from "reigncode-ui/resize-handle"
|
|
8
|
+
import { Mark } from "reigncode-ui/logo"
|
|
9
9
|
import { DragDropProvider, DragDropSensors, DragOverlay, SortableProvider, closestCenter } from "@thisbeyond/solid-dnd"
|
|
10
10
|
import type { DragEvent } from "@thisbeyond/solid-dnd"
|
|
11
11
|
import { ConstrainDragYAxis, getDraggableId } from "@/utils/solid-dnd"
|
|
12
|
-
import { useDialog } from "
|
|
12
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
13
13
|
|
|
14
14
|
import FileTree from "@/components/file-tree"
|
|
15
15
|
import { SessionContextUsage } from "@/components/session-context-usage"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { For, Show, createEffect, createMemo, on, onCleanup, onMount } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { Tabs } from "
|
|
4
|
-
import { ResizeHandle } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { TooltipKeybind } from "
|
|
3
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
4
|
+
import { ResizeHandle } from "reigncode-ui/resize-handle"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { TooltipKeybind } from "reigncode-ui/tooltip"
|
|
7
7
|
import { DragDropProvider, DragDropSensors, DragOverlay, SortableProvider, closestCenter } from "@thisbeyond/solid-dnd"
|
|
8
8
|
import type { DragEvent } from "@thisbeyond/solid-dnd"
|
|
9
9
|
import { ConstrainDragYAxis, getDraggableId } from "@/utils/solid-dnd"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useNavigate } from "@solidjs/router"
|
|
2
2
|
import { useCommand, type CommandOption } from "@/context/command"
|
|
3
|
-
import { useDialog } from "
|
|
4
|
-
import { previewSelectedLines } from "
|
|
3
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
4
|
+
import { previewSelectedLines } from "reigncode-ui/pierre/selection-bridge"
|
|
5
5
|
import { useFile, selectionFromLines, type FileSelection, type SelectedLineRange } from "@/context/file"
|
|
6
6
|
import { useLanguage } from "@/context/language"
|
|
7
7
|
import { useLayout } from "@/context/layout"
|
|
@@ -15,11 +15,11 @@ import { DialogSelectFile } from "@/components/dialog-select-file"
|
|
|
15
15
|
import { DialogSelectModel } from "@/components/dialog-select-model"
|
|
16
16
|
import { DialogSelectMcp } from "@/components/dialog-select-mcp"
|
|
17
17
|
import { DialogFork } from "@/components/dialog-fork"
|
|
18
|
-
import { showToast } from "
|
|
19
|
-
import { findLast } from "
|
|
18
|
+
import { showToast } from "reigncode-ui/toast"
|
|
19
|
+
import { findLast } from "reigncode-util/array"
|
|
20
20
|
import { createSessionTabs } from "@/pages/session/helpers"
|
|
21
21
|
import { extractPromptFromParts } from "@/utils/prompt"
|
|
22
|
-
import { UserMessage } from "
|
|
22
|
+
import { UserMessage } from "reigncode-sdk/v2"
|
|
23
23
|
import { useSessionLayout } from "@/pages/session/session-layout"
|
|
24
24
|
|
|
25
25
|
export type SessionCommandContext = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserMessage } from "
|
|
1
|
+
import type { UserMessage } from "reigncode-sdk/v2"
|
|
2
2
|
import { useLocation, useNavigate } from "@solidjs/router"
|
|
3
3
|
import { createEffect, createMemo, onCleanup, onMount } from "solid-js"
|
|
4
4
|
import { messageIdFromHash } from "./message-id-from-hash"
|
package/src/pages/session.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Project, UserMessage } from "
|
|
2
|
-
import { useDialog } from "
|
|
1
|
+
import type { Project, UserMessage } from "reigncode-sdk/v2"
|
|
2
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
3
3
|
import { useMutation } from "@tanstack/solid-query"
|
|
4
4
|
import {
|
|
5
5
|
batch,
|
|
@@ -19,14 +19,14 @@ import { createResizeObserver } from "@solid-primitives/resize-observer"
|
|
|
19
19
|
import { useLocal } from "@/context/local"
|
|
20
20
|
import { selectionFromLines, useFile, type FileSelection, type SelectedLineRange } from "@/context/file"
|
|
21
21
|
import { createStore } from "solid-js/store"
|
|
22
|
-
import { ResizeHandle } from "
|
|
23
|
-
import { Select } from "
|
|
24
|
-
import { Tabs } from "
|
|
25
|
-
import { createAutoScroll } from "
|
|
26
|
-
import { previewSelectedLines } from "
|
|
27
|
-
import { Button } from "
|
|
28
|
-
import { showToast } from "
|
|
29
|
-
import { base64Encode, checksum } from "
|
|
22
|
+
import { ResizeHandle } from "reigncode-ui/resize-handle"
|
|
23
|
+
import { Select } from "reigncode-ui/select"
|
|
24
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
25
|
+
import { createAutoScroll } from "reigncode-ui/hooks"
|
|
26
|
+
import { previewSelectedLines } from "reigncode-ui/pierre/selection-bridge"
|
|
27
|
+
import { Button } from "reigncode-ui/button"
|
|
28
|
+
import { showToast } from "reigncode-ui/toast"
|
|
29
|
+
import { base64Encode, checksum } from "reigncode-util/encode"
|
|
30
30
|
import { useNavigate, useSearchParams } from "@solidjs/router"
|
|
31
31
|
import { NewSessionView, SessionHeader } from "@/components/session"
|
|
32
32
|
import { useComments } from "@/context/comments"
|
|
@@ -20,23 +20,23 @@ beforeEach(() => {
|
|
|
20
20
|
|
|
21
21
|
describe("theme preload", () => {
|
|
22
22
|
test("migrates legacy oc-1 to oc-2 before mount", () => {
|
|
23
|
-
localStorage.setItem("
|
|
24
|
-
localStorage.setItem("
|
|
25
|
-
localStorage.setItem("
|
|
23
|
+
localStorage.setItem("reigncode-theme-id", "oc-1")
|
|
24
|
+
localStorage.setItem("reigncode-theme-css-light", "--background-base:#fff;")
|
|
25
|
+
localStorage.setItem("reigncode-theme-css-dark", "--background-base:#000;")
|
|
26
26
|
|
|
27
27
|
run()
|
|
28
28
|
|
|
29
29
|
expect(document.documentElement.dataset.theme).toBe("oc-2")
|
|
30
30
|
expect(document.documentElement.dataset.colorScheme).toBe("light")
|
|
31
|
-
expect(localStorage.getItem("
|
|
32
|
-
expect(localStorage.getItem("
|
|
33
|
-
expect(localStorage.getItem("
|
|
31
|
+
expect(localStorage.getItem("reigncode-theme-id")).toBe("oc-2")
|
|
32
|
+
expect(localStorage.getItem("reigncode-theme-css-light")).toBeNull()
|
|
33
|
+
expect(localStorage.getItem("reigncode-theme-css-dark")).toBeNull()
|
|
34
34
|
expect(document.getElementById("oc-theme-preload")).toBeNull()
|
|
35
35
|
})
|
|
36
36
|
|
|
37
37
|
test("keeps cached css for non-default themes", () => {
|
|
38
|
-
localStorage.setItem("
|
|
39
|
-
localStorage.setItem("
|
|
38
|
+
localStorage.setItem("reigncode-theme-id", "nightowl")
|
|
39
|
+
localStorage.setItem("reigncode-theme-css-light", "--background-base:#fff;")
|
|
40
40
|
|
|
41
41
|
run()
|
|
42
42
|
|
package/src/utils/base64.ts
CHANGED
|
@@ -22,22 +22,22 @@ class MemoryStorage implements Storage {
|
|
|
22
22
|
getItem(key: string) {
|
|
23
23
|
this.calls.get += 1
|
|
24
24
|
this.events.push(`get:${key}`)
|
|
25
|
-
if (key.startsWith("
|
|
25
|
+
if (key.startsWith("reigncode.throw")) throw new Error("storage get failed")
|
|
26
26
|
return this.values.get(key) ?? null
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
setItem(key: string, value: string) {
|
|
30
30
|
this.calls.set += 1
|
|
31
31
|
this.events.push(`set:${key}`)
|
|
32
|
-
if (key.startsWith("
|
|
33
|
-
if (key.startsWith("
|
|
32
|
+
if (key.startsWith("reigncode.quota")) throw new DOMException("quota", "QuotaExceededError")
|
|
33
|
+
if (key.startsWith("reigncode.throw")) throw new Error("storage set failed")
|
|
34
34
|
this.values.set(key, value)
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
removeItem(key: string) {
|
|
38
38
|
this.calls.remove += 1
|
|
39
39
|
this.events.push(`remove:${key}`)
|
|
40
|
-
if (key.startsWith("
|
|
40
|
+
if (key.startsWith("reigncode.throw")) throw new Error("storage remove failed")
|
|
41
41
|
this.values.delete(key)
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -69,15 +69,15 @@ beforeEach(() => {
|
|
|
69
69
|
|
|
70
70
|
describe("persist localStorage resilience", () => {
|
|
71
71
|
test("does not cache values as persisted when quota write and eviction fail", () => {
|
|
72
|
-
const storageApi = persistTesting.localStorageWithPrefix("
|
|
72
|
+
const storageApi = persistTesting.localStorageWithPrefix("reigncode.quota.scope")
|
|
73
73
|
storageApi.setItem("value", '{"value":1}')
|
|
74
74
|
|
|
75
|
-
expect(storage.getItem("
|
|
75
|
+
expect(storage.getItem("reigncode.quota.scope:value")).toBeNull()
|
|
76
76
|
expect(storageApi.getItem("value")).toBeNull()
|
|
77
77
|
})
|
|
78
78
|
|
|
79
79
|
test("disables only the failing scope when storage throws", () => {
|
|
80
|
-
const bad = persistTesting.localStorageWithPrefix("
|
|
80
|
+
const bad = persistTesting.localStorageWithPrefix("reigncode.throw.scope")
|
|
81
81
|
bad.setItem("value", '{"value":1}')
|
|
82
82
|
|
|
83
83
|
const before = storage.calls.set
|
|
@@ -85,13 +85,13 @@ describe("persist localStorage resilience", () => {
|
|
|
85
85
|
expect(storage.calls.set).toBe(before)
|
|
86
86
|
expect(bad.getItem("value")).toBeNull()
|
|
87
87
|
|
|
88
|
-
const healthy = persistTesting.localStorageWithPrefix("
|
|
88
|
+
const healthy = persistTesting.localStorageWithPrefix("reigncode.safe.scope")
|
|
89
89
|
healthy.setItem("value", '{"value":3}')
|
|
90
|
-
expect(storage.getItem("
|
|
90
|
+
expect(storage.getItem("reigncode.safe.scope:value")).toBe('{"value":3}')
|
|
91
91
|
})
|
|
92
92
|
|
|
93
93
|
test("failing fallback scope does not poison direct storage scope", () => {
|
|
94
|
-
const broken = persistTesting.localStorageWithPrefix("
|
|
94
|
+
const broken = persistTesting.localStorageWithPrefix("reigncode.throw.scope2")
|
|
95
95
|
broken.setItem("value", '{"value":1}')
|
|
96
96
|
|
|
97
97
|
const direct = persistTesting.localStorageDirect()
|
|
@@ -108,7 +108,7 @@ describe("persist localStorage resilience", () => {
|
|
|
108
108
|
test("workspace storage sanitizes Windows filename characters", () => {
|
|
109
109
|
const result = persistTesting.workspaceStorage("C:\\Users\\foo")
|
|
110
110
|
|
|
111
|
-
expect(result).toStartWith("
|
|
111
|
+
expect(result).toStartWith("reigncode.workspace.")
|
|
112
112
|
expect(result.endsWith(".dat")).toBeTrue()
|
|
113
113
|
expect(/[:\\/]/.test(result)).toBeFalse()
|
|
114
114
|
})
|
package/src/utils/persist.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Platform, usePlatform } from "@/context/platform"
|
|
2
2
|
import { makePersisted, type AsyncStorage, type SyncStorage } from "@solid-primitives/storage"
|
|
3
|
-
import { checksum } from "
|
|
3
|
+
import { checksum } from "reigncode-util/encode"
|
|
4
4
|
import { createResource, type Accessor } from "solid-js"
|
|
5
5
|
import type { SetStoreFunction, Store } from "solid-js/store"
|
|
6
6
|
|
|
@@ -20,8 +20,8 @@ type PersistTarget = {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const LEGACY_STORAGE = "default.dat"
|
|
23
|
-
const GLOBAL_STORAGE = "
|
|
24
|
-
const LOCAL_PREFIX = "
|
|
23
|
+
const GLOBAL_STORAGE = "reigncode.global.dat"
|
|
24
|
+
const LOCAL_PREFIX = "reigncode."
|
|
25
25
|
const fallback = new Map<string, boolean>()
|
|
26
26
|
|
|
27
27
|
const CACHE_MAX_ENTRIES = 500
|
|
@@ -211,7 +211,7 @@ function normalize(defaults: unknown, raw: string, migrate?: (value: unknown) =>
|
|
|
211
211
|
function workspaceStorage(dir: string) {
|
|
212
212
|
const head = (dir.slice(0, 12) || "workspace").replace(/[^a-zA-Z0-9._-]/g, "-")
|
|
213
213
|
const sum = checksum(dir) ?? "0"
|
|
214
|
-
return `
|
|
214
|
+
return `reigncode.workspace.${head}.${sum}.dat`
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
function localStorageWithPrefix(prefix: string): SyncStorage {
|
package/src/utils/prompt.test.ts
CHANGED
package/src/utils/prompt.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentPart as MessageAgentPart, FilePart, Part, TextPart } from "
|
|
1
|
+
import type { AgentPart as MessageAgentPart, FilePart, Part, TextPart } from "reigncode-sdk/v2"
|
|
2
2
|
import type { AgentPart, FileAttachmentPart, ImageAttachmentPart, Prompt } from "@/context/prompt"
|
|
3
3
|
|
|
4
4
|
type Inline =
|
|
@@ -36,7 +36,7 @@ describe("parseReadableConfigInvalidError", () => {
|
|
|
36
36
|
const error = {
|
|
37
37
|
name: "ConfigInvalidError",
|
|
38
38
|
data: {
|
|
39
|
-
path: "
|
|
39
|
+
path: "reigncode.config.ts",
|
|
40
40
|
issues: [
|
|
41
41
|
{ path: ["settings", "host"], message: "Required" },
|
|
42
42
|
{ path: ["mode"], message: "Invalid" },
|
|
@@ -47,7 +47,7 @@ describe("parseReadableConfigInvalidError", () => {
|
|
|
47
47
|
const result = parseReadableConfigInvalidError(error, language.t)
|
|
48
48
|
|
|
49
49
|
expect(result).toBe(
|
|
50
|
-
["Arquivo de config em
|
|
50
|
+
["Arquivo de config em reigncode.config.ts invalido: settings.host: Required", "mode: Invalid"].join("\n"),
|
|
51
51
|
)
|
|
52
52
|
})
|
|
53
53
|
|
package/src/utils/server.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createOpencodeClient } from "
|
|
1
|
+
import { createOpencodeClient } from "reigncode-sdk/v2/client"
|
|
2
2
|
import type { ServerConnection } from "@/context/server"
|
|
3
3
|
|
|
4
4
|
export function createSdkForServer({
|
|
@@ -10,7 +10,7 @@ export function createSdkForServer({
|
|
|
10
10
|
const auth = (() => {
|
|
11
11
|
if (!server.password) return
|
|
12
12
|
return {
|
|
13
|
-
Authorization: `Basic ${btoa(`${server.username ?? "
|
|
13
|
+
Authorization: `Basic ${btoa(`${server.username ?? "reigncode"}:${server.password}`)}`,
|
|
14
14
|
}
|
|
15
15
|
})()
|
|
16
16
|
|