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
|
@@ -2,21 +2,21 @@ import { Popover as Kobalte } from "@kobalte/core/popover"
|
|
|
2
2
|
import { Component, ComponentProps, createMemo, JSX, Show, ValidComponent } from "solid-js"
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
4
|
import { useLocal } from "@/context/local"
|
|
5
|
-
import { useDialog } from "
|
|
5
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
6
6
|
import { popularProviders } from "@/hooks/use-providers"
|
|
7
|
-
import { Button } from "
|
|
8
|
-
import { IconButton } from "
|
|
9
|
-
import { Tag } from "
|
|
10
|
-
import { Dialog } from "
|
|
11
|
-
import { List } from "
|
|
12
|
-
import { Tooltip } from "
|
|
7
|
+
import { Button } from "reigncode-ui/button"
|
|
8
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
9
|
+
import { Tag } from "reigncode-ui/tag"
|
|
10
|
+
import { Dialog } from "reigncode-ui/dialog"
|
|
11
|
+
import { List } from "reigncode-ui/list"
|
|
12
|
+
import { Tooltip } from "reigncode-ui/tooltip"
|
|
13
13
|
import { DialogSelectProvider } from "./dialog-select-provider"
|
|
14
14
|
import { DialogManageModels } from "./dialog-manage-models"
|
|
15
15
|
import { ModelTooltip } from "./model-tooltip"
|
|
16
16
|
import { useLanguage } from "@/context/language"
|
|
17
17
|
|
|
18
18
|
const isFree = (provider: string, cost: { input: number } | undefined) =>
|
|
19
|
-
provider === "
|
|
19
|
+
provider === "reigncode" && (!cost || cost.input === 0)
|
|
20
20
|
|
|
21
21
|
type ModelState = ReturnType<typeof useLocal>["model"]
|
|
22
22
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Component, Show } from "solid-js"
|
|
2
|
-
import { useDialog } from "
|
|
2
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
3
3
|
import { popularProviders, useProviders } from "@/hooks/use-providers"
|
|
4
|
-
import { Dialog } from "
|
|
5
|
-
import { List } from "
|
|
6
|
-
import { Tag } from "
|
|
7
|
-
import { ProviderIcon } from "
|
|
4
|
+
import { Dialog } from "reigncode-ui/dialog"
|
|
5
|
+
import { List } from "reigncode-ui/list"
|
|
6
|
+
import { Tag } from "reigncode-ui/tag"
|
|
7
|
+
import { ProviderIcon } from "reigncode-ui/provider-icon"
|
|
8
8
|
import { DialogConnectProvider } from "./dialog-connect-provider"
|
|
9
9
|
import { useLanguage } from "@/context/language"
|
|
10
10
|
import { DialogCustomProvider } from "./dialog-custom-provider"
|
|
@@ -23,7 +23,7 @@ export const DialogSelectProvider: Component = () => {
|
|
|
23
23
|
if (id === "anthropic") return language.t("dialog.provider.anthropic.note")
|
|
24
24
|
if (id === "openai") return language.t("dialog.provider.openai.note")
|
|
25
25
|
if (id.startsWith("github-copilot")) return language.t("dialog.provider.copilot.note")
|
|
26
|
-
if (id === "
|
|
26
|
+
if (id === "reigncode-go") return language.t("dialog.provider.opencodeGo.tagline")
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
return (
|
|
@@ -65,17 +65,17 @@ export const DialogSelectProvider: Component = () => {
|
|
|
65
65
|
<div class="px-1.25 w-full flex items-center gap-x-3">
|
|
66
66
|
<ProviderIcon data-slot="list-item-extra-icon" id={i.id} />
|
|
67
67
|
<span>{i.name}</span>
|
|
68
|
-
<Show when={i.id === "
|
|
69
|
-
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.
|
|
68
|
+
<Show when={i.id === "reigncode"}>
|
|
69
|
+
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.reigncode.tagline")}</div>
|
|
70
70
|
</Show>
|
|
71
71
|
<Show when={i.id === CUSTOM_ID}>
|
|
72
72
|
<Tag>{language.t("settings.providers.tag.custom")}</Tag>
|
|
73
73
|
</Show>
|
|
74
|
-
<Show when={i.id === "
|
|
74
|
+
<Show when={i.id === "reigncode"}>
|
|
75
75
|
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
|
|
76
76
|
</Show>
|
|
77
77
|
<Show when={note(i.id)}>{(value) => <div class="text-14-regular text-text-weak">{value()}</div>}</Show>
|
|
78
|
-
<Show when={i.id === "
|
|
78
|
+
<Show when={i.id === "reigncode-go"}>
|
|
79
79
|
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
|
|
80
80
|
</Show>
|
|
81
81
|
</div>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Button } from "
|
|
2
|
-
import { useDialog } from "
|
|
3
|
-
import { Dialog } from "
|
|
4
|
-
import { DropdownMenu } from "
|
|
5
|
-
import { Icon } from "
|
|
6
|
-
import { IconButton } from "
|
|
7
|
-
import { List } from "
|
|
8
|
-
import { TextField } from "
|
|
1
|
+
import { Button } from "reigncode-ui/button"
|
|
2
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
3
|
+
import { Dialog } from "reigncode-ui/dialog"
|
|
4
|
+
import { DropdownMenu } from "reigncode-ui/dropdown-menu"
|
|
5
|
+
import { Icon } from "reigncode-ui/icon"
|
|
6
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
7
|
+
import { List } from "reigncode-ui/list"
|
|
8
|
+
import { TextField } from "reigncode-ui/text-field"
|
|
9
9
|
import { useMutation } from "@tanstack/solid-query"
|
|
10
|
-
import { showToast } from "
|
|
10
|
+
import { showToast } from "reigncode-ui/toast"
|
|
11
11
|
import { useNavigate } from "@solidjs/router"
|
|
12
12
|
import { createEffect, createMemo, createResource, onCleanup, Show } from "solid-js"
|
|
13
13
|
import { createStore, reconcile } from "solid-js/store"
|
|
@@ -17,7 +17,7 @@ import { usePlatform } from "@/context/platform"
|
|
|
17
17
|
import { normalizeServerUrl, ServerConnection, useServer } from "@/context/server"
|
|
18
18
|
import { type ServerHealth, useCheckServerHealth } from "@/utils/server-health"
|
|
19
19
|
|
|
20
|
-
const DEFAULT_USERNAME = "
|
|
20
|
+
const DEFAULT_USERNAME = "reigncode"
|
|
21
21
|
|
|
22
22
|
interface ServerFormProps {
|
|
23
23
|
value: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from "solid-js"
|
|
2
|
-
import { Dialog } from "
|
|
3
|
-
import { Tabs } from "
|
|
4
|
-
import { Icon } from "
|
|
2
|
+
import { Dialog } from "reigncode-ui/dialog"
|
|
3
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
4
|
+
import { Icon } from "reigncode-ui/icon"
|
|
5
5
|
import { useLanguage } from "@/context/language"
|
|
6
6
|
import { usePlatform } from "@/context/platform"
|
|
7
7
|
import { SettingsGeneral } from "./settings-general"
|
|
@@ -20,15 +20,15 @@ beforeAll(async () => {
|
|
|
20
20
|
},
|
|
21
21
|
}),
|
|
22
22
|
}))
|
|
23
|
-
mock.module("
|
|
23
|
+
mock.module("reigncode-ui/collapsible", () => ({
|
|
24
24
|
Collapsible: {
|
|
25
25
|
Trigger: (props: { children?: unknown }) => props.children,
|
|
26
26
|
Content: (props: { children?: unknown }) => props.children,
|
|
27
27
|
},
|
|
28
28
|
}))
|
|
29
|
-
mock.module("
|
|
30
|
-
mock.module("
|
|
31
|
-
mock.module("
|
|
29
|
+
mock.module("reigncode-ui/file-icon", () => ({ FileIcon: () => null }))
|
|
30
|
+
mock.module("reigncode-ui/icon", () => ({ Icon: () => null }))
|
|
31
|
+
mock.module("reigncode-ui/tooltip", () => ({ Tooltip: (props: { children?: unknown }) => props.children }))
|
|
32
32
|
const mod = await import("./file-tree")
|
|
33
33
|
shouldListRoot = mod.shouldListRoot
|
|
34
34
|
shouldListExpanded = mod.shouldListExpanded
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFile } from "@/context/file"
|
|
2
2
|
import { encodeFilePath } from "@/context/file/path"
|
|
3
|
-
import { Collapsible } from "
|
|
4
|
-
import { FileIcon } from "
|
|
5
|
-
import { Icon } from "
|
|
3
|
+
import { Collapsible } from "reigncode-ui/collapsible"
|
|
4
|
+
import { FileIcon } from "reigncode-ui/file-icon"
|
|
5
|
+
import { Icon } from "reigncode-ui/icon"
|
|
6
6
|
import {
|
|
7
7
|
createEffect,
|
|
8
8
|
createMemo,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
type ParentProps,
|
|
19
19
|
} from "solid-js"
|
|
20
20
|
import { Dynamic } from "solid-js/web"
|
|
21
|
-
import type { FileNode } from "
|
|
21
|
+
import type { FileNode } from "reigncode-sdk/v2"
|
|
22
22
|
|
|
23
23
|
const MAX_DEPTH = 128
|
|
24
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onCleanup, onMount } from "solid-js"
|
|
2
|
-
import { showToast } from "
|
|
2
|
+
import { showToast } from "reigncode-ui/toast"
|
|
3
3
|
import { usePrompt, type ContentPart, type ImageAttachmentPart } from "@/context/prompt"
|
|
4
4
|
import { useLanguage } from "@/context/language"
|
|
5
5
|
import { uuid } from "@/utils/uuid"
|
|
@@ -184,7 +184,7 @@ describe("buildRequestParts", () => {
|
|
|
184
184
|
text: "@README.md",
|
|
185
185
|
messageID: "msg_mac_1",
|
|
186
186
|
sessionID: "ses_mac_1",
|
|
187
|
-
sessionDirectory: "/Users/kelvin/Projects/
|
|
187
|
+
sessionDirectory: "/Users/kelvin/Projects/reigncode",
|
|
188
188
|
})
|
|
189
189
|
|
|
190
190
|
const filePart = result.requestParts.find((part) => part.type === "file")
|
|
@@ -193,7 +193,7 @@ describe("buildRequestParts", () => {
|
|
|
193
193
|
// URL should be parseable
|
|
194
194
|
expect(() => new URL(filePart.url)).not.toThrow()
|
|
195
195
|
// Should be a normal Unix path
|
|
196
|
-
expect(filePart.url).toBe("file:///Users/kelvin/Projects/
|
|
196
|
+
expect(filePart.url).toBe("file:///Users/kelvin/Projects/reigncode/README.md")
|
|
197
197
|
}
|
|
198
198
|
})
|
|
199
199
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getFilename } from "
|
|
2
|
-
import { type AgentPartInput, type FilePartInput, type Part, type TextPartInput } from "
|
|
1
|
+
import { getFilename } from "reigncode-util/path"
|
|
2
|
+
import { type AgentPartInput, type FilePartInput, type Part, type TextPartInput } from "reigncode-sdk/v2/client"
|
|
3
3
|
import type { FileSelection } from "@/context/file"
|
|
4
4
|
import { encodeFilePath } from "@/context/file/path"
|
|
5
5
|
import type { AgentPart, FileAttachmentPart, ImageAttachmentPart, Prompt } from "@/context/prompt"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Component, For, Show } from "solid-js"
|
|
2
|
-
import { FileIcon } from "
|
|
3
|
-
import { IconButton } from "
|
|
4
|
-
import { Tooltip } from "
|
|
5
|
-
import { getDirectory, getFilename, getFilenameTruncated } from "
|
|
2
|
+
import { FileIcon } from "reigncode-ui/file-icon"
|
|
3
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
4
|
+
import { Tooltip } from "reigncode-ui/tooltip"
|
|
5
|
+
import { getDirectory, getFilename, getFilenameTruncated } from "reigncode-util/path"
|
|
6
6
|
import type { ContextItem } from "@/context/prompt"
|
|
7
7
|
|
|
8
8
|
type PromptContextItem = ContextItem & { key: string }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, For, Match, Show, Switch } from "solid-js"
|
|
2
|
-
import { FileIcon } from "
|
|
3
|
-
import { Icon } from "
|
|
4
|
-
import { getDirectory, getFilename } from "
|
|
2
|
+
import { FileIcon } from "reigncode-ui/file-icon"
|
|
3
|
+
import { Icon } from "reigncode-ui/icon"
|
|
4
|
+
import { getDirectory, getFilename } from "reigncode-util/path"
|
|
5
5
|
|
|
6
6
|
export type AtOption =
|
|
7
7
|
| { type: "agent"; name: string; display: string }
|
|
@@ -63,18 +63,18 @@ beforeAll(async () => {
|
|
|
63
63
|
useParams: () => params,
|
|
64
64
|
}))
|
|
65
65
|
|
|
66
|
-
mock.module("
|
|
66
|
+
mock.module("reigncode-sdk/v2/client", () => ({
|
|
67
67
|
createOpencodeClient: (input: { directory: string }) => {
|
|
68
68
|
createdClients.push(input.directory)
|
|
69
69
|
return clientFor(input.directory)
|
|
70
70
|
},
|
|
71
71
|
}))
|
|
72
72
|
|
|
73
|
-
mock.module("
|
|
73
|
+
mock.module("reigncode-ui/toast", () => ({
|
|
74
74
|
showToast: () => 0,
|
|
75
75
|
}))
|
|
76
76
|
|
|
77
|
-
mock.module("
|
|
77
|
+
mock.module("reigncode-util/encode", () => ({
|
|
78
78
|
base64Encode: (value: string) => value,
|
|
79
79
|
}))
|
|
80
80
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Message, Session } from "
|
|
2
|
-
import { showToast } from "
|
|
3
|
-
import { base64Encode } from "
|
|
4
|
-
import { Binary } from "
|
|
1
|
+
import type { Message, Session } from "reigncode-sdk/v2/client"
|
|
2
|
+
import { showToast } from "reigncode-ui/toast"
|
|
3
|
+
import { base64Encode } from "reigncode-util/encode"
|
|
4
|
+
import { Binary } from "reigncode-util/binary"
|
|
5
5
|
import { useNavigate, useParams } from "@solidjs/router"
|
|
6
6
|
import type { Accessor } from "solid-js"
|
|
7
7
|
import type { FileSelection } from "@/context/file"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFilteredList } from "
|
|
2
|
-
import { useSpring } from "
|
|
1
|
+
import { useFilteredList } from "reigncode-ui/hooks"
|
|
2
|
+
import { useSpring } from "reigncode-ui/motion-spring"
|
|
3
3
|
import { createEffect, on, Component, Show, onCleanup, createMemo, createSignal } from "solid-js"
|
|
4
4
|
import { createStore } from "solid-js/store"
|
|
5
5
|
import { useLocal } from "@/context/local"
|
|
@@ -18,14 +18,14 @@ import { useLayout } from "@/context/layout"
|
|
|
18
18
|
import { useSDK } from "@/context/sdk"
|
|
19
19
|
import { useSync } from "@/context/sync"
|
|
20
20
|
import { useComments } from "@/context/comments"
|
|
21
|
-
import { Button } from "
|
|
22
|
-
import { DockShellForm, DockTray } from "
|
|
23
|
-
import { Icon } from "
|
|
24
|
-
import { ProviderIcon } from "
|
|
25
|
-
import { Tooltip, TooltipKeybind } from "
|
|
26
|
-
import { IconButton } from "
|
|
27
|
-
import { Select } from "
|
|
28
|
-
import { useDialog } from "
|
|
21
|
+
import { Button } from "reigncode-ui/button"
|
|
22
|
+
import { DockShellForm, DockTray } from "reigncode-ui/dock-surface"
|
|
23
|
+
import { Icon } from "reigncode-ui/icon"
|
|
24
|
+
import { ProviderIcon } from "reigncode-ui/provider-icon"
|
|
25
|
+
import { Tooltip, TooltipKeybind } from "reigncode-ui/tooltip"
|
|
26
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
27
|
+
import { Select } from "reigncode-ui/select"
|
|
28
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
29
29
|
import { ModelSelectorPopover } from "@/components/dialog-select-model"
|
|
30
30
|
import { DialogSelectModelUnpaid } from "@/components/dialog-select-model-unpaid"
|
|
31
31
|
import { useProviders } from "@/hooks/use-providers"
|
|
@@ -55,7 +55,7 @@ import { PromptContextItems } from "./prompt-input/context-items"
|
|
|
55
55
|
import { PromptImageAttachments } from "./prompt-input/image-attachments"
|
|
56
56
|
import { PromptDragOverlay } from "./prompt-input/drag-overlay"
|
|
57
57
|
import { promptPlaceholder } from "./prompt-input/placeholder"
|
|
58
|
-
import { ImagePreview } from "
|
|
58
|
+
import { ImagePreview } from "reigncode-ui/image-preview"
|
|
59
59
|
|
|
60
60
|
interface PromptInputProps {
|
|
61
61
|
class?: string
|
|
@@ -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 { estimateSessionContextBreakdown } from "./session-context-breakdown"
|
|
4
4
|
|
|
5
5
|
const user = (id: string) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createMemo, createEffect, on, onCleanup, For, Show } from "solid-js"
|
|
2
2
|
import type { JSX } from "solid-js"
|
|
3
3
|
import { useSync } from "@/context/sync"
|
|
4
|
-
import { checksum } from "
|
|
5
|
-
import { findLast } from "
|
|
4
|
+
import { checksum } from "reigncode-util/encode"
|
|
5
|
+
import { findLast } from "reigncode-util/array"
|
|
6
6
|
import { same } from "@/utils/same"
|
|
7
|
-
import { Icon } from "
|
|
8
|
-
import { Accordion } from "
|
|
9
|
-
import { StickyAccordionHeader } from "
|
|
10
|
-
import { File } from "
|
|
11
|
-
import { Markdown } from "
|
|
12
|
-
import { ScrollView } from "
|
|
13
|
-
import type { Message, Part, UserMessage } from "
|
|
7
|
+
import { Icon } from "reigncode-ui/icon"
|
|
8
|
+
import { Accordion } from "reigncode-ui/accordion"
|
|
9
|
+
import { StickyAccordionHeader } from "reigncode-ui/sticky-accordion-header"
|
|
10
|
+
import { File } from "reigncode-ui/file"
|
|
11
|
+
import { Markdown } from "reigncode-ui/markdown"
|
|
12
|
+
import { ScrollView } from "reigncode-ui/scroll-view"
|
|
13
|
+
import type { Message, Part, UserMessage } from "reigncode-sdk/v2/client"
|
|
14
14
|
import { useLanguage } from "@/context/language"
|
|
15
15
|
import { useSessionLayout } from "@/pages/session/session-layout"
|
|
16
16
|
import { getSessionContextMetrics } from "./session-context-metrics"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AppIcon } from "
|
|
2
|
-
import { Button } from "
|
|
3
|
-
import { DropdownMenu } from "
|
|
4
|
-
import { Icon } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { Keybind } from "
|
|
7
|
-
import { Spinner } from "
|
|
8
|
-
import { showToast } from "
|
|
9
|
-
import { Tooltip, TooltipKeybind } from "
|
|
10
|
-
import { getFilename } from "
|
|
1
|
+
import { AppIcon } from "reigncode-ui/app-icon"
|
|
2
|
+
import { Button } from "reigncode-ui/button"
|
|
3
|
+
import { DropdownMenu } from "reigncode-ui/dropdown-menu"
|
|
4
|
+
import { Icon } from "reigncode-ui/icon"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { Keybind } from "reigncode-ui/keybind"
|
|
7
|
+
import { Spinner } from "reigncode-ui/spinner"
|
|
8
|
+
import { showToast } from "reigncode-ui/toast"
|
|
9
|
+
import { Tooltip, TooltipKeybind } from "reigncode-ui/tooltip"
|
|
10
|
+
import { getFilename } from "reigncode-util/path"
|
|
11
11
|
import { createEffect, createMemo, For, onCleanup, Show } from "solid-js"
|
|
12
12
|
import { createStore } from "solid-js/store"
|
|
13
13
|
import { Portal } from "solid-js/web"
|
|
@@ -262,8 +262,8 @@ export function SessionHeader() {
|
|
|
262
262
|
.catch((err: unknown) => showRequestError(language, err))
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
const centerMount = createMemo(() => document.getElementById("
|
|
266
|
-
const rightMount = createMemo(() => document.getElementById("
|
|
265
|
+
const centerMount = createMemo(() => document.getElementById("reigncode-titlebar-center"))
|
|
266
|
+
const rightMount = createMemo(() => document.getElementById("reigncode-titlebar-right"))
|
|
267
267
|
|
|
268
268
|
return (
|
|
269
269
|
<>
|
|
@@ -3,9 +3,9 @@ import { DateTime } from "luxon"
|
|
|
3
3
|
import { useSync } from "@/context/sync"
|
|
4
4
|
import { useSDK } from "@/context/sdk"
|
|
5
5
|
import { useLanguage } from "@/context/language"
|
|
6
|
-
import { Icon } from "
|
|
7
|
-
import { Mark } from "
|
|
8
|
-
import { getDirectory, getFilename } from "
|
|
6
|
+
import { Icon } from "reigncode-ui/icon"
|
|
7
|
+
import { Mark } from "reigncode-ui/logo"
|
|
8
|
+
import { getDirectory, getFilename } from "reigncode-util/path"
|
|
9
9
|
|
|
10
10
|
const MAIN_WORKTREE = "main"
|
|
11
11
|
const CREATE_WORKTREE = "create"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createMemo, Show } from "solid-js"
|
|
2
2
|
import type { JSX } from "solid-js"
|
|
3
3
|
import { createSortable } from "@thisbeyond/solid-dnd"
|
|
4
|
-
import { FileIcon } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { TooltipKeybind } from "
|
|
7
|
-
import { Tabs } from "
|
|
8
|
-
import { getFilename } from "
|
|
4
|
+
import { FileIcon } from "reigncode-ui/file-icon"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { TooltipKeybind } from "reigncode-ui/tooltip"
|
|
7
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
8
|
+
import { getFilename } from "reigncode-util/path"
|
|
9
9
|
import { useFile } from "@/context/file"
|
|
10
10
|
import { useLanguage } from "@/context/language"
|
|
11
11
|
import { useCommand } from "@/context/command"
|
|
@@ -2,10 +2,10 @@ import type { JSX } from "solid-js"
|
|
|
2
2
|
import { Show, createEffect, onCleanup } from "solid-js"
|
|
3
3
|
import { createStore } from "solid-js/store"
|
|
4
4
|
import { createSortable } from "@thisbeyond/solid-dnd"
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { Tabs } from "
|
|
7
|
-
import { DropdownMenu } from "
|
|
8
|
-
import { Icon } from "
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
7
|
+
import { DropdownMenu } from "reigncode-ui/dropdown-menu"
|
|
8
|
+
import { Icon } from "reigncode-ui/icon"
|
|
9
9
|
import { isDefaultTitle as isDefaultTerminalTitle } from "@/context/terminal-title"
|
|
10
10
|
import { useTerminal, type LocalPTY } from "@/context/terminal"
|
|
11
11
|
import { useLanguage } from "@/context/language"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Match, Show, Switch, createMemo } from "solid-js"
|
|
2
|
-
import { Tooltip, type TooltipProps } from "
|
|
3
|
-
import { ProgressCircle } from "
|
|
4
|
-
import { Button } from "
|
|
2
|
+
import { Tooltip, type TooltipProps } from "reigncode-ui/tooltip"
|
|
3
|
+
import { ProgressCircle } from "reigncode-ui/progress-circle"
|
|
4
|
+
import { Button } from "reigncode-ui/button"
|
|
5
5
|
|
|
6
6
|
import { useFile } from "@/context/file"
|
|
7
7
|
import { useLayout } from "@/context/layout"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Component, Show, createMemo, createResource, type JSX } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { Icon } from "
|
|
5
|
-
import { Select } from "
|
|
6
|
-
import { Switch } from "
|
|
7
|
-
import { Tooltip } from "
|
|
8
|
-
import { useTheme, type ColorScheme } from "
|
|
9
|
-
import { showToast } from "
|
|
3
|
+
import { Button } from "reigncode-ui/button"
|
|
4
|
+
import { Icon } from "reigncode-ui/icon"
|
|
5
|
+
import { Select } from "reigncode-ui/select"
|
|
6
|
+
import { Switch } from "reigncode-ui/switch"
|
|
7
|
+
import { Tooltip } from "reigncode-ui/tooltip"
|
|
8
|
+
import { useTheme, type ColorScheme } from "reigncode-ui/theme"
|
|
9
|
+
import { showToast } from "reigncode-ui/toast"
|
|
10
10
|
import { useLanguage } from "@/context/language"
|
|
11
11
|
import { usePlatform } from "@/context/platform"
|
|
12
12
|
import { useSettings, monoFontFamily } from "@/context/settings"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Component, For, Show, createMemo, onCleanup, onMount } from "solid-js"
|
|
2
2
|
import { createStore } from "solid-js/store"
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { Icon } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { TextField } from "
|
|
7
|
-
import { showToast } from "
|
|
3
|
+
import { Button } from "reigncode-ui/button"
|
|
4
|
+
import { Icon } from "reigncode-ui/icon"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { TextField } from "reigncode-ui/text-field"
|
|
7
|
+
import { showToast } from "reigncode-ui/toast"
|
|
8
8
|
import fuzzysort from "fuzzysort"
|
|
9
9
|
import { formatKeybind, parseKeybind, useCommand } from "@/context/command"
|
|
10
10
|
import { useLanguage } from "@/context/language"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useFilteredList } from "
|
|
2
|
-
import { ProviderIcon } from "
|
|
3
|
-
import { Switch } from "
|
|
4
|
-
import { Icon } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { TextField } from "
|
|
1
|
+
import { useFilteredList } from "reigncode-ui/hooks"
|
|
2
|
+
import { ProviderIcon } from "reigncode-ui/provider-icon"
|
|
3
|
+
import { Switch } from "reigncode-ui/switch"
|
|
4
|
+
import { Icon } from "reigncode-ui/icon"
|
|
5
|
+
import { IconButton } from "reigncode-ui/icon-button"
|
|
6
|
+
import { TextField } from "reigncode-ui/text-field"
|
|
7
7
|
import { type Component, For, Show } from "solid-js"
|
|
8
8
|
import { useLanguage } from "@/context/language"
|
|
9
9
|
import { useModels } from "@/context/models"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button } from "
|
|
2
|
-
import { useDialog } from "
|
|
3
|
-
import { ProviderIcon } from "
|
|
4
|
-
import { Tag } from "
|
|
5
|
-
import { showToast } from "
|
|
1
|
+
import { Button } from "reigncode-ui/button"
|
|
2
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
3
|
+
import { ProviderIcon } from "reigncode-ui/provider-icon"
|
|
4
|
+
import { Tag } from "reigncode-ui/tag"
|
|
5
|
+
import { showToast } from "reigncode-ui/toast"
|
|
6
6
|
import { popularProviders, useProviders } from "@/hooks/use-providers"
|
|
7
7
|
import { createMemo, type Component, For, Show } from "solid-js"
|
|
8
8
|
import { useLanguage } from "@/context/language"
|
|
@@ -17,8 +17,8 @@ type ProviderSource = "env" | "api" | "config" | "custom"
|
|
|
17
17
|
type ProviderItem = ReturnType<ReturnType<typeof useProviders>["connected"]>[number]
|
|
18
18
|
|
|
19
19
|
const PROVIDER_NOTES = [
|
|
20
|
-
{ match: (id: string) => id === "
|
|
21
|
-
{ match: (id: string) => id === "
|
|
20
|
+
{ match: (id: string) => id === "reigncode", key: "dialog.provider.reigncode.note" },
|
|
21
|
+
{ match: (id: string) => id === "reigncode-go", key: "dialog.provider.opencodeGo.tagline" },
|
|
22
22
|
{ match: (id: string) => id === "anthropic", key: "dialog.provider.anthropic.note" },
|
|
23
23
|
{ match: (id: string) => id.startsWith("github-copilot"), key: "dialog.provider.copilot.note" },
|
|
24
24
|
{ match: (id: string) => id === "openai", key: "dialog.provider.openai.note" },
|
|
@@ -37,7 +37,7 @@ export const SettingsProviders: Component = () => {
|
|
|
37
37
|
const connected = createMemo(() => {
|
|
38
38
|
return providers
|
|
39
39
|
.connected()
|
|
40
|
-
.filter((p) => p.id !== "
|
|
40
|
+
.filter((p) => p.id !== "reigncode" || Object.values(p.models).find((m) => m.cost?.input))
|
|
41
41
|
})
|
|
42
42
|
|
|
43
43
|
const popular = createMemo(() => {
|
|
@@ -183,10 +183,10 @@ export const SettingsProviders: Component = () => {
|
|
|
183
183
|
<div class="flex items-center gap-x-3">
|
|
184
184
|
<ProviderIcon id={item.id} class="size-5 shrink-0 icon-strong-base" />
|
|
185
185
|
<span class="text-14-medium text-text-strong">{item.name}</span>
|
|
186
|
-
<Show when={item.id === "
|
|
186
|
+
<Show when={item.id === "reigncode"}>
|
|
187
187
|
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
|
|
188
188
|
</Show>
|
|
189
|
-
<Show when={item.id === "
|
|
189
|
+
<Show when={item.id === "reigncode-go"}>
|
|
190
190
|
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
|
|
191
191
|
</Show>
|
|
192
192
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Button } from "
|
|
2
|
-
import { useDialog } from "
|
|
3
|
-
import { Icon } from "
|
|
4
|
-
import { Popover } from "
|
|
5
|
-
import { Switch } from "
|
|
6
|
-
import { Tabs } from "
|
|
1
|
+
import { Button } from "reigncode-ui/button"
|
|
2
|
+
import { useDialog } from "reigncode-ui/context/dialog"
|
|
3
|
+
import { Icon } from "reigncode-ui/icon"
|
|
4
|
+
import { Popover } from "reigncode-ui/popover"
|
|
5
|
+
import { Switch } from "reigncode-ui/switch"
|
|
6
|
+
import { Tabs } from "reigncode-ui/tabs"
|
|
7
7
|
import { useMutation } from "@tanstack/solid-query"
|
|
8
|
-
import { showToast } from "
|
|
8
|
+
import { showToast } from "reigncode-ui/toast"
|
|
9
9
|
import { useNavigate } from "@solidjs/router"
|
|
10
10
|
import { type Accessor, createEffect, createMemo, createSignal, For, type JSXElement, onCleanup, Show } from "solid-js"
|
|
11
11
|
import { createStore, reconcile } from "solid-js/store"
|