Skip to content

Commit 023ca4c

Browse files
juliusmarmingecodex
andcommitted
Adapt mobile runtime to Effect base
Co-authored-by: codex <codex@users.noreply.github.com>
1 parent f57c163 commit 023ca4c

6 files changed

Lines changed: 10 additions & 5 deletions

File tree

apps/mobile/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"expo-camera": "~55.0.15",
5959
"expo-clipboard": "~55.0.9",
6060
"expo-constants": "^55.0.9",
61+
"expo-crypto": "~55.0.15",
6162
"expo-dev-client": "~55.0.26",
6263
"expo-file-system": "~55.0.16",
6364
"expo-font": "^55.0.4",

apps/mobile/src/features/threads/use-project-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export function useProjectActions() {
137137
prepareWorktree: {
138138
projectCwd: input.project.workspaceRoot,
139139
baseBranch: input.branch!,
140-
branch: buildTemporaryWorktreeBranchName(),
140+
branch: buildTemporaryWorktreeBranchName(uuidv4),
141141
},
142142
runSetupScript: true,
143143
}

apps/mobile/src/lib/uuid.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Effect from "effect/Effect";
2-
import * as Random from "effect/Random";
1+
import * as Crypto from "expo-crypto";
32

4-
export const uuidv4 = () => Effect.runSync(Random.nextUUIDv4);
3+
export const uuidv4 = () => Crypto.randomUUID();

apps/web/src/components/ChatView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ import {
115115
nextProjectScriptId,
116116
projectScriptIdFromCommand,
117117
} from "~/projectScripts";
118-
import { newCommandId, newDraftId, newMessageId, newThreadId } from "~/lib/utils";
118+
import { newCommandId, newDraftId, newMessageId, newThreadId, randomUUID } from "~/lib/utils";
119119
import { getProviderModelCapabilities, resolveSelectableProvider } from "../providerModels";
120120
import { useSettings } from "../hooks/useSettings";
121121
import { resolveAppModelSelectionForInstance } from "../modelSelection";

bun.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/client-runtime/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"@effect/language-service": "catalog:",
27+
"@effect/vitest": "catalog:",
2728
"typescript": "catalog:",
2829
"vitest": "catalog:"
2930
}

0 commit comments

Comments
 (0)