Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

rm dupe

Julius Marmingef6136bd4c2a2
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index 3918fdac4..cf04d28e1 100644
--- a/apps/web/src/components/ChatView.tsx
+++ b/apps/web/src/components/ChatView.tsx
@@ -60,7 +60,7 @@ import {
import { isScrollContainerNearBottom } from "../chat-scroll";
import { useStore } from "../store";
import { MAX_THREAD_TERMINAL_COUNT, type ChatImageAttachment } from "../types";
-import { getVscodeIconUrlForEntry } from "../vscode-icons";
+import { basenameOfPath, getVscodeIconUrlForEntry } from "../vscode-icons";
import { useTheme } from "../hooks/useTheme";
import BranchToolbar from "./BranchToolbar";
import GitActionsControl from "./GitActionsControl";
@@ -125,12 +125,6 @@ function workToneClass(tone: "thinking" | "tool" | "info" | "error"): string {
return "text-muted-foreground/40";
}
-function basenameOfPath(pathValue: string): string {
- const slashIndex = pathValue.lastIndexOf("/");
- if (slashIndex === -1) return pathValue;
- return pathValue.slice(slashIndex + 1);
-}
-
type SessionContinuityState = "resumed" | "new" | "fallback_new";
interface EnsuredSessionInfo {
diff --git a/apps/web/src/vscode-icons.ts b/apps/web/src/vscode-icons.ts
index 696e5b23d..e2c0d9583 100644
--- a/apps/web/src/vscode-icons.ts
+++ b/apps/web/src/vscode-icons.ts
@@ -66,7 +66,7 @@ function toLowercaseLookup(source: Record<string, string>): Record<string, strin
return lookup;
}
-function basenameOfPath(pathValue: string): string {
+export function basenameOfPath(pathValue: string): string {
const slashIndex = pathValue.lastIndexOf("/");
if (slashIndex === -1) return pathValue;
return pathValue.slice(slashIndex + 1);
@@ -88,7 +88,10 @@ function extensionCandidates(fileName: string): string[] {
return [...candidates];
}
-function resolveLanguageFallbackDefinition(pathValue: string, theme: "light" | "dark"): string | null {
+function resolveLanguageFallbackDefinition(
+ pathValue: string,
+ theme: "light" | "dark",
+): string | null {
const basename = basenameOfPath(pathValue).toLowerCase();
const languageIds = theme === "light" ? lightLanguageIds : darkLanguageIds;
@@ -99,8 +102,9 @@ function resolveLanguageFallbackDefinition(pathValue: string, theme: "light" | "
for (const candidate of extensionCandidates(basename)) {
const languageId =
- localLanguageIdByExtensionOverrides[candidate as keyof typeof localLanguageIdByExtensionOverrides] ??
- languageIdByExtension[candidate];
+ localLanguageIdByExtensionOverrides[
+ candidate as keyof typeof localLanguageIdByExtensionOverrides
+ ] ?? languageIdByExtension[candidate];
if (!languageId) continue;
return languageIds[languageId] ?? darkLanguageIds[languageId] ?? null;
}