Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/src/composerDraftStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
scopeThreadRef,
} from "@t3tools/client-runtime/environment";
import * as Schema from "effect/Schema";
import { DraftId } from "./draftId";
import * as Equal from "effect/Equal";
import * as Effect from "effect/Effect";
import { DeepMutable } from "effect/Types";
Expand Down Expand Up @@ -121,8 +122,7 @@ const COMPOSER_DRAFT_STORAGE_VERSION = 9;
const DraftThreadEnvModeSchema = Schema.Literals(["local", "worktree"]);
export type DraftThreadEnvMode = typeof DraftThreadEnvModeSchema.Type;

export const DraftId = Schema.String.pipe(Schema.brand("DraftId"));
export type DraftId = typeof DraftId.Type;
export { DraftId } from "./draftId";

const COMPOSER_PERSIST_DEBOUNCE_MS = 300;

Expand Down
6 changes: 6 additions & 0 deletions apps/web/src/draftId.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as Schema from "effect/Schema";

// Kept out of composerDraftStore so lib/utils can mint ids without importing the store,
// whose toast import would close a cycle back to lib/utils.
export const DraftId = Schema.String.pipe(Schema.brand("DraftId"));
export type DraftId = typeof DraftId.Type;
2 changes: 1 addition & 1 deletion apps/web/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isMacPlatform } from "@t3tools/shared/keybindings";
import { type CxOptions, cx } from "class-variance-authority";
import * as Hex from "effect/encoding/Hex";
import { extendTailwindMerge } from "tailwind-merge";
import { DraftId } from "../composerDraftStore";
import { DraftId } from "../draftId";

// Register extra font sizes and background images so tailwind-merge does not
// treat text-2xs or bg-composer-seam-below as colors.
Expand Down
Loading