Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): repo-root-relative file chips open in subfolder projects #14510

MergedGigioxx(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/14510/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 175 additions and 1 deletion (loading 4).

x
0 of 5 viewed, 5 left
175 additions and 1 deletionapps/web/src/components/ChatMarkdown.browser.test.tsxModified
View file
@@ -1,15 +1,28 @@
-import { EnvironmentId } from "@t3tools/contracts";
+import { EnvironmentId, ThreadId } from "@t3tools/contracts";
import { searchableMessageSegments } from "@t3tools/shared/threadFindText";
import { countThreadSearchOccurrences } from "@t3tools/shared/threadSearch";
+import { AsyncResult } from "effect/reactivity";
import { act, type ReactElement } from "react";
import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test";
​
+import { filesystemEnvironment } from "../state/filesystem";
+import { useRightPanelStore } from "../rightPanelStore";
import { getSyntaxHighlighterPromise } from "../lib/syntaxHighlighting";
import { MarkdownFindContext } from "./chat/markdownFindContext";
import { useThreadFindHighlights } from "./chat/threadFindHighlights";
import { setMarkdownTaskChecked } from "./files/filePreviewMode";
​
+const { workspaceSearch, filesystemMetadata } = vi.hoisted(() => ({
+ workspaceSearch: vi.fn(),
+ filesystemMetadata: vi.fn(),
+}));
+vi.mock(import("../state/use-atom-query-runner"), async (original) => ({
+ ...(await original()),
+ useAtomQueryRunner: ((family: unknown) =>
+ family === filesystemEnvironment.getMetadata ? filesystemMetadata : workspaceSearch) as never,
+}));
+​
// Atoms derived from the server config run in the real registry over a missing config.
vi.mock(import("../state/server"), async (original) => {
const actual = await original();