Merge origin/main into mobile remote connect
Co-authored-by: codex <[email protected]>
This commit is contained in:
commit
0c1ccdadf1
16 files changed
+87
-21
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@t3tools/desktop",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "dist-electron/main.cjs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "t3",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -19,7 +19,6 @@
|
||||
"build": "node scripts/cli.ts build",
|
||||
"build:bundle": "tsdown",
|
||||
"start": "node dist/bin.mjs",
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run",
|
||||
"test:process-reaper": "vitest run src/server.test.ts src/provider/Layers/ClaudeAdapter.test.ts src/provider/Layers/ProviderSessionDirectory.test.ts src/provider/Layers/ProviderSessionReaper.test.ts src/provider/Layers/CodexAdapter.test.ts"
|
||||
@@ -30,7 +29,7 @@
|
||||
"@effect/platform-node": "catalog:",
|
||||
"@effect/sql-sqlite-bun": "catalog:",
|
||||
"@opencode-ai/sdk": "^1.3.15",
|
||||
"@pierre/diffs": "^1.1.0-beta.16",
|
||||
"@pierre/diffs": "catalog:",
|
||||
"effect": "catalog:",
|
||||
"node-pty": "^1.1.0",
|
||||
"open": "^10.1.0"
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
"name": "@t3tools/web",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"prepare": "effect-language-service patch",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run --passWithNoTests",
|
||||
@@ -23,7 +22,7 @@
|
||||
"@formkit/auto-animate": "^0.9.0",
|
||||
"@legendapp/list": "3.0.0-beta.44",
|
||||
"@lexical/react": "^0.41.0",
|
||||
"@pierre/diffs": "^1.1.0-beta.16",
|
||||
"@pierre/diffs": "catalog:",
|
||||
"@t3tools/client-runtime": "workspace:*",
|
||||
"@t3tools/contracts": "workspace:*",
|
||||
"@t3tools/shared": "workspace:*",
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
|
||||
import { scopeThreadRef } from "@t3tools/client-runtime";
|
||||
import type { TurnId } from "@t3tools/contracts";
|
||||
import {
|
||||
ChevronDownIcon,
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
Columns2Icon,
|
||||
@@ -161,6 +162,21 @@ function buildFileDiffRenderKey(fileDiff: FileDiffMetadata): string {
|
||||
return fileDiff.cacheKey ?? `${fileDiff.prevName ?? "none"}:${fileDiff.name}`;
|
||||
}
|
||||
|
||||
function getDiffCollapseIconClassName(fileDiff: FileDiffMetadata): string {
|
||||
switch (fileDiff.type) {
|
||||
case "new":
|
||||
return "text-[var(--diffs-addition-base)]";
|
||||
case "deleted":
|
||||
return "text-[var(--diffs-deletion-base)]";
|
||||
case "change":
|
||||
case "rename-pure":
|
||||
case "rename-changed":
|
||||
return "text-[var(--diffs-modified-base)]";
|
||||
default:
|
||||
return "text-muted-foreground/80";
|
||||
}
|
||||
}
|
||||
|
||||
interface DiffPanelProps {
|
||||
mode?: DiffPanelMode;
|
||||
}
|
||||
@@ -174,6 +190,9 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
|
||||
const [diffRenderMode, setDiffRenderMode] = useState<DiffRenderMode>("stacked");
|
||||
const [diffWordWrap, setDiffWordWrap] = useState(settings.diffWordWrap);
|
||||
const [diffIgnoreWhitespace, setDiffIgnoreWhitespace] = useState(settings.diffIgnoreWhitespace);
|
||||
const [collapsedDiffFileKeys, setCollapsedDiffFileKeys] = useState<ReadonlySet<string>>(
|
||||
() => new Set(),
|
||||
);
|
||||
const patchViewportRef = useRef<HTMLDivElement>(null);
|
||||
const turnStripRef = useRef<HTMLDivElement>(null);
|
||||
const previousDiffOpenRef = useRef(false);
|
||||
@@ -317,6 +336,19 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
|
||||
);
|
||||
}, [renderablePatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (renderableFiles.length === 0) {
|
||||
setCollapsedDiffFileKeys((current) => (current.size === 0 ? current : new Set()));
|
||||
return;
|
||||
}
|
||||
|
||||
const visibleFileKeys = new Set(renderableFiles.map(buildFileDiffRenderKey));
|
||||
setCollapsedDiffFileKeys((current) => {
|
||||
const next = new Set([...current].filter((fileKey) => visibleFileKeys.has(fileKey)));
|
||||
return next.size === current.size ? current : next;
|
||||
});
|
||||
}, [renderableFiles]);
|
||||
|
||||
useEffect(() => {
|
||||
if (diffOpen && !previousDiffOpenRef.current) {
|
||||
setDiffWordWrap(settings.diffWordWrap);
|
||||
@@ -346,6 +378,17 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
|
||||
},
|
||||
[activeCwd],
|
||||
);
|
||||
const toggleDiffFileCollapsed = useCallback((fileKey: string) => {
|
||||
setCollapsedDiffFileKeys((current) => {
|
||||
const next = new Set(current);
|
||||
if (next.has(fileKey)) {
|
||||
next.delete(fileKey);
|
||||
} else {
|
||||
next.add(fileKey);
|
||||
}
|
||||
return next;
|
||||
});
|
||||
}, []);
|
||||
|
||||
const selectTurn = (turnId: TurnId) => {
|
||||
if (!activeThread) return;
|
||||
@@ -620,11 +663,12 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
|
||||
const filePath = resolveFileDiffPath(fileDiff);
|
||||
const fileKey = buildFileDiffRenderKey(fileDiff);
|
||||
const themedFileKey = `${fileKey}:${resolvedTheme}`;
|
||||
const collapsed = collapsedDiffFileKeys.has(fileKey);
|
||||
return (
|
||||
<div
|
||||
key={themedFileKey}
|
||||
data-diff-file-path={filePath}
|
||||
className="diff-render-file mb-2 rounded-md first:mt-2 last:mb-0"
|
||||
className="diff-render-file group/diff-file mb-2 rounded-md first:mt-2 last:mb-0"
|
||||
onClickCapture={(event) => {
|
||||
const nativeEvent = event.nativeEvent as MouseEvent;
|
||||
const composedPath = nativeEvent.composedPath?.() ?? [];
|
||||
@@ -638,7 +682,30 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
|
||||
>
|
||||
<FileDiff
|
||||
fileDiff={fileDiff}
|
||||
renderHeaderPrefix={() => (
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
"inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-sm border-0 bg-transparent p-0 transition-colors hover:bg-foreground/10 focus-visible:outline-hidden",
|
||||
getDiffCollapseIconClassName(fileDiff),
|
||||
)}
|
||||
aria-label={collapsed ? `Expand ${filePath}` : `Collapse ${filePath}`}
|
||||
aria-expanded={!collapsed}
|
||||
title={collapsed ? "Expand diff" : "Collapse diff"}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
toggleDiffFileCollapsed(fileKey);
|
||||
}}
|
||||
>
|
||||
{collapsed ? (
|
||||
<ChevronRightIcon className="size-4" />
|
||||
) : (
|
||||
<ChevronDownIcon className="size-4" />
|
||||
)}
|
||||
</button>
|
||||
)}
|
||||
options={{
|
||||
collapsed,
|
||||
diffStyle: diffRenderMode === "split" ? "split" : "unified",
|
||||
lineDiffType: "none",
|
||||
overflow: diffWordWrap ? "wrap" : "scroll",
|
||||
|
||||
@@ -28,7 +28,7 @@ const DiffPanel = lazy(() => import("../components/DiffPanel"));
|
||||
const DIFF_INLINE_SIDEBAR_WIDTH_STORAGE_KEY = "chat_diff_sidebar_width";
|
||||
const DIFF_INLINE_DEFAULT_WIDTH = "clamp(24rem,34vw,36rem)";
|
||||
const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 22 * 16;
|
||||
const DIFF_INLINE_SIDEBAR_MAX_WIDTH = 36 * 16;
|
||||
const DIFF_INLINE_SIDEBAR_MAX_WIDTH = 256 * 16;
|
||||
const COMPOSER_COMPACT_MIN_LEFT_CONTROLS_WIDTH_PX = 208;
|
||||
|
||||
const DiffLoadingFallback = (props: { mode: DiffPanelMode }) => {
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
"": {
|
||||
"name": "@t3tools/monorepo",
|
||||
"devDependencies": {
|
||||
"@effect/language-service": "catalog:",
|
||||
"@types/node": "catalog:",
|
||||
"oxfmt": "^0.40.0",
|
||||
"oxlint": "^1.55.0",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "catalog:",
|
||||
"vitest": "catalog:",
|
||||
},
|
||||
},
|
||||
@@ -124,7 +126,7 @@
|
||||
"@effect/platform-node": "catalog:",
|
||||
"@effect/sql-sqlite-bun": "catalog:",
|
||||
"@opencode-ai/sdk": "^1.3.15",
|
||||
"@pierre/diffs": "^1.1.0-beta.16",
|
||||
"@pierre/diffs": "catalog:",
|
||||
"effect": "catalog:",
|
||||
"node-pty": "^1.1.0",
|
||||
"open": "^10.1.0",
|
||||
@@ -158,7 +160,7 @@
|
||||
"@formkit/auto-animate": "^0.9.0",
|
||||
"@legendapp/list": "3.0.0-beta.44",
|
||||
"@lexical/react": "^0.41.0",
|
||||
"@pierre/diffs": "^1.1.0-beta.16",
|
||||
"@pierre/diffs": "catalog:",
|
||||
"@t3tools/client-runtime": "workspace:*",
|
||||
"@t3tools/contracts": "workspace:*",
|
||||
"@t3tools/shared": "workspace:*",
|
||||
@@ -348,6 +350,7 @@
|
||||
"@effect/platform-node-shared": "4.0.0-beta.59",
|
||||
"@effect/sql-sqlite-bun": "4.0.0-beta.59",
|
||||
"@effect/vitest": "4.0.0-beta.59",
|
||||
"@pierre/diffs": "1.1.20",
|
||||
"@types/bun": "^1.3.11",
|
||||
"@types/node": "^24.10.13",
|
||||
"effect": "4.0.0-beta.59",
|
||||
@@ -998,7 +1001,7 @@
|
||||
|
||||
"@oxlint/binding-win32-x64-msvc": ["@oxlint/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-JOro4ZcfBLamJCyfURQmOQByoorgOdx3ZjAkSqnb/CyG/i+lN3KoV5LAgk5ZAW6DPq7/Cx7n23f8DuTWXTWgyQ=="],
|
||||
|
||||
"@pierre/diffs": ["@pierre/[email protected].15", "", { "dependencies": { "@pierre/theme": "0.0.28", "@shikijs/transformers": "^3.0.0", "diff": "8.0.3", "hast-util-to-html": "9.0.5", "lru_map": "0.4.1", "shiki": "^3.0.0" }, "peerDependencies": { "react": "^18.3.1 || ^19.0.0", "react-dom": "^18.3.1 || ^19.0.0" } }, "sha512-Gj863E+aSpc0H3C4cH0fQTaF/tP9yYfhnilR7/dS72qq8thqNpR3fo3jURHRtRKz6KJJ10anxcurHP7b3ZUQkw=="],
|
||||
"@pierre/diffs": ["@pierre/[email protected].20", "", { "dependencies": { "@pierre/theme": "0.0.28", "@shikijs/transformers": "^3.0.0", "diff": "8.0.3", "hast-util-to-html": "9.0.5", "lru_map": "0.4.1", "shiki": "^3.0.0" }, "peerDependencies": { "react": "^18.3.1 || ^19.0.0", "react-dom": "^18.3.1 || ^19.0.0" } }, "sha512-lLi+3sLCm3QDd5/aLO9pw+WbF6UzhrkWm2oTZ5WZJTGemOyUNRJ4DDhcEKmVusu4C4bXx9Nssh6fF+wQcapb5w=="],
|
||||
|
||||
"@pierre/theme": ["@pierre/[email protected]", "", {}, "sha512-1j/H/fECBuc9dEvntdWI+l435HZapw+RCJTlqCA6BboQ5TjlnE005j/ROWutXIs8aq5OAc82JI2Kwk4A1WWBgw=="],
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"@effect/sql-sqlite-bun": "4.0.0-beta.59",
|
||||
"@effect/vitest": "4.0.0-beta.59",
|
||||
"@effect/language-service": "0.84.2",
|
||||
"@pierre/diffs": "1.1.20",
|
||||
"@types/bun": "^1.3.11",
|
||||
"@types/node": "^24.10.13",
|
||||
"tsdown": "^0.20.3",
|
||||
@@ -27,6 +28,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"postinstall": "node scripts/patch-expo-dev-launcher.mjs && node scripts/patch-react-native-nitro-modules.mjs && node scripts/patch-pierre-diffs-utils.mjs",
|
||||
"prepare": "effect-language-service patch",
|
||||
"dev": "node scripts/dev-runner.ts dev",
|
||||
"dev:server": "node scripts/dev-runner.ts dev:server",
|
||||
"dev:web": "node scripts/dev-runner.ts dev:web",
|
||||
@@ -60,10 +62,12 @@
|
||||
"sync:vscode-icons": "node scripts/sync-vscode-icons.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@effect/language-service": "catalog:",
|
||||
"@types/node": "catalog:",
|
||||
"oxfmt": "^0.40.0",
|
||||
"oxlint": "^1.55.0",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "catalog:",
|
||||
"vitest": "catalog:"
|
||||
},
|
||||
"overrides": {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@t3tools/contracts",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"private": true,
|
||||
"files": [
|
||||
"dist"
|
||||
@@ -24,7 +24,6 @@
|
||||
"scripts": {
|
||||
"dev": "tsdown src/index.ts --format esm,cjs --dts --watch --clean",
|
||||
"build": "tsdown src/index.ts --format esm,cjs --dts --clean",
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
"scripts": {
|
||||
"dev": "tsdown src/client.ts src/agent.ts src/_generated/schema.gen.ts src/rpc.ts src/protocol.ts src/terminal.ts --format esm,cjs --dts --watch --clean",
|
||||
"build": "tsdown src/client.ts src/agent.ts src/_generated/schema.gen.ts src/rpc.ts src/protocol.ts src/terminal.ts --format esm,cjs --dts --clean",
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run",
|
||||
"generate": "bun run scripts/generate.ts"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
"scripts": {
|
||||
"dev": "tsdown src/client.ts src/rpc.ts src/protocol.ts src/schema.ts --format esm,cjs --dts --watch --clean",
|
||||
"build": "tsdown src/client.ts src/rpc.ts src/protocol.ts src/schema.ts --format esm,cjs --dts --clean",
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run",
|
||||
"generate": "bun run scripts/generate.ts",
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prepare": "effect-language-service patch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
|
||||
@@ -197,6 +197,8 @@ try {
|
||||
},
|
||||
);
|
||||
|
||||
rmSync(resolve(tempRoot, "bun.lock"), { force: true });
|
||||
|
||||
execFileSync("bun", ["install", "--ignore-scripts"], {
|
||||
cwd: tempRoot,
|
||||
stdio: "inherit",
|
||||
|
||||
Reference in new issue
Block a user