@devries-cameron20 / t3code Mirror · read-only / commits / f6136bd4c2
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 18:30 UTC

rm dupe

Julius Marminge committed Feb 17, 2026 at 17:57 UTC f6136bd4c2a23a37c41610ac352058bc17a198a8
2 files changed +9 -11
apps/web/src/components/ChatView.tsx
+1 -7
@@ -60,7 +60,7 @@ import {
60 import { isScrollContainerNearBottom } from "../chat-scroll";
61 import { useStore } from "../store";
62 import { MAX_THREAD_TERMINAL_COUNT, type ChatImageAttachment } from "../types";
63 -import { getVscodeIconUrlForEntry } from "../vscode-icons";
63 +import { basenameOfPath, getVscodeIconUrlForEntry } from "../vscode-icons";
64 import { useTheme } from "../hooks/useTheme";
65 import BranchToolbar from "./BranchToolbar";
66 import GitActionsControl from "./GitActionsControl";
@@ -125,12 +125,6 @@ function workToneClass(tone: "thinking" | "tool" | "info" | "error"): string {
125 return "text-muted-foreground/40";
126 }
127
128 -function basenameOfPath(pathValue: string): string {
129 - const slashIndex = pathValue.lastIndexOf("/");
130 - if (slashIndex === -1) return pathValue;
131 - return pathValue.slice(slashIndex + 1);
132 -}
133 -
128 type SessionContinuityState = "resumed" | "new" | "fallback_new";
129
130 interface EnsuredSessionInfo {
apps/web/src/vscode-icons.ts
+8 -4
@@ -66,7 +66,7 @@ function toLowercaseLookup(source: Record<string, string>): Record<string, strin
66 return lookup;
67 }
68
69 -function basenameOfPath(pathValue: string): string {
69 +export function basenameOfPath(pathValue: string): string {
70 const slashIndex = pathValue.lastIndexOf("/");
71 if (slashIndex === -1) return pathValue;
72 return pathValue.slice(slashIndex + 1);
@@ -88,7 +88,10 @@ function extensionCandidates(fileName: string): string[] {
88 return [...candidates];
89 }
90
91 -function resolveLanguageFallbackDefinition(pathValue: string, theme: "light" | "dark"): string | null {
91 +function resolveLanguageFallbackDefinition(
92 + pathValue: string,
93 + theme: "light" | "dark",
94 +): string | null {
95 const basename = basenameOfPath(pathValue).toLowerCase();
96 const languageIds = theme === "light" ? lightLanguageIds : darkLanguageIds;
97
@@ -99,8 +102,9 @@ function resolveLanguageFallbackDefinition(pathValue: string, theme: "light" | "
102
103 for (const candidate of extensionCandidates(basename)) {
104 const languageId =
102 - localLanguageIdByExtensionOverrides[candidate as keyof typeof localLanguageIdByExtensionOverrides] ??
103 - languageIdByExtension[candidate];
105 + localLanguageIdByExtensionOverrides[
106 + candidate as keyof typeof localLanguageIdByExtensionOverrides
107 + ] ?? languageIdByExtension[candidate];
108 if (!languageId) continue;
109 return languageIds[languageId] ?? darkLanguageIds[languageId] ?? null;
110 }