Skip to content

Commit d4caf80

Browse files
committed
fix(gui): remove unused TypeScript variables in AI & Chat components
Clean up unused TypeScript variables flagged by TS6133 in AI and Chat related components per AGENT9.md analysis: - FeedbackDialog.tsx: Remove unused import encodeSystemInfoForUrl - FormatterSelector.tsx: Remove unused imports (createEffect, LSPFormatterProvider, LanguageFormatters, useEditor) - NotebookDiff.tsx: Remove unused index parameter in For loop - NotebookEditor.tsx: Prefix unused position parameter with underscore - Notification.tsx: Remove unused index parameter in For loop - AIOnboarding.tsx: Remove unused stepLabels variable and prefix unused step parameter
1 parent ef585f5 commit d4caf80

File tree

6 files changed

+7
-17
lines changed

6 files changed

+7
-17
lines changed

cortex-gui/src/components/FeedbackDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Show, For, createSignal, createEffect, onMount, onCleanup } from "solid-js";
22
import { Icon } from "./ui/Icon";
33
import { useToast } from "@/context/ToastContext";
4-
import { collectSystemInfo, formatSystemInfo, encodeSystemInfoForUrl, type SystemInfo } from "@/utils/systemInfo";
4+
import { collectSystemInfo, formatSystemInfo, type SystemInfo } from "@/utils/systemInfo";
55
import { getLogs, copyLogsToClipboard, openInBrowser, isTauri } from "@/utils/tauri";
66
import { invoke } from "@tauri-apps/api/core";
77

cortex-gui/src/components/FormatterSelector.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
* - Prompts user when multiple formatters are available
1010
*/
1111

12-
import { createSignal, createEffect, Show, For, createMemo, onMount, onCleanup } from "solid-js";
13-
import { useFormatter, type FormatterType, type LSPFormatterProvider, type LanguageFormatters } from "@/context/FormatterContext";
14-
import { useEditor } from "@/context/EditorContext";
12+
import { createSignal, Show, For, createMemo, onMount, onCleanup } from "solid-js";
13+
import { useFormatter, type FormatterType } from "@/context/FormatterContext";
1514
import { Icon } from "./ui/Icon";
1615

1716
/** Display names for built-in formatters */

cortex-gui/src/components/Notification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export function Notification(props: NotificationProps) {
246246
}}
247247
>
248248
<For each={props.notification.actions}>
249-
{(action, index) => (
249+
{(action) => (
250250
<button
251251
style={{
252252
width: "fit-content",

cortex-gui/src/components/notebook/NotebookDiff.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ function SideBySideDiffLines(props: { changes: Change[] }) {
498498
}}
499499
>
500500
<For each={lines()}>
501-
{(pair, index) => (
501+
{(pair) => (
502502
<>
503503
<div
504504
class="px-2 py-0.5 border-r"

cortex-gui/src/components/notebook/NotebookEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2402,7 +2402,7 @@ export function NotebookEditor(props: NotebookEditorProps) {
24022402
};
24032403

24042404
// Search navigation and replacement handlers
2405-
const navigateToCell = (cellId: string, position?: { line: number; column: number }) => {
2405+
const navigateToCell = (cellId: string, _position?: { line: number; column: number }) => {
24062406
setActiveCellId(cellId);
24072407

24082408
// Scroll the cell into view

cortex-gui/src/components/onboarding/AIOnboarding.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,21 +290,12 @@ function StepIndicator(props: {
290290
steps: OnboardingStep[];
291291
currentStep: OnboardingStep;
292292
}) {
293-
const stepLabels: Record<OnboardingStep, string> = {
294-
welcome: "Welcome",
295-
provider: "Provider",
296-
apiKey: "API Key",
297-
features: "Features",
298-
tips: "Tips",
299-
complete: "Complete",
300-
};
301-
302293
const currentIndex = () => props.steps.indexOf(props.currentStep);
303294

304295
return (
305296
<div class="flex items-center justify-center gap-2 mb-6">
306297
<For each={props.steps}>
307-
{(step, index) => (
298+
{(_step, index) => (
308299
<div class="flex items-center">
309300
<div
310301
class={`flex items-center justify-center w-8 h-8 rounded-full text-xs font-medium transition-colors ${

0 commit comments

Comments
 (0)