import { For, Match, Show, Switch, createMemo, onCleanup, type JSX, type ValidComponent } from "solid-js" import { Tabs } from "@opencode-ai/ui/tabs" import { IconButton } from "@opencode-ai/ui/icon-button" import { Tooltip, TooltipKeybind } from "@opencode-ai/ui/tooltip" import { ResizeHandle } from "@opencode-ai/ui/resize-handle" import { Mark } from "@opencode-ai/ui/logo" import FileTree from "@/components/file-tree" import { SessionContextUsage } from "@/components/session-context-usage" import { SessionContextTab, SortableTab, FileVisual } from "@/components/session" import { DialogSelectFile } from "@/components/dialog-select-file" import { createFileTabListSync } from "@/pages/session/file-tab-scroll" import { FileTabContent } from "@/pages/session/file-tabs" import { StickyAddButton } from "@/pages/session/review-tab" import { DragDropProvider, DragDropSensors, DragOverlay, SortableProvider, closestCenter } from "@thisbeyond/solid-dnd" import { ConstrainDragYAxis } from "@/utils/solid-dnd" import type { DragEvent } from "@thisbeyond/solid-dnd" import { useComments } from "@/context/comments" import { useCommand } from "@/context/command" import { useDialog } from "@opencode-ai/ui/context/dialog" import { useFile, type SelectedLineRange } from "@/context/file" import { useLanguage } from "@/context/language" import { useLayout } from "@/context/layout" import { useSync } from "@/context/sync" export function SessionSidePanel(props: { open: boolean language: ReturnType layout: ReturnType command: ReturnType dialog: ReturnType file: ReturnType comments: ReturnType sync: ReturnType hasReview: boolean reviewCount: number reviewTab: boolean contextOpen: () => boolean openedTabs: () => string[] activeTab: () => string activeFileTab: () => string | undefined tabs: () => ReturnType["tabs"]> openTab: (value: string) => void showAllFiles: () => void reviewPanel: () => JSX.Element messages: () => unknown[] visibleUserMessages: () => unknown[] view: () => ReturnType["view"]> info: () => unknown handoffFiles: () => Record | undefined codeComponent: NonNullable addCommentToContext: (input: { file: string selection: SelectedLineRange comment: string preview?: string origin?: "review" | "file" }) => void activeDraggable: () => string | undefined onDragStart: (event: unknown) => void onDragEnd: () => void onDragOver: (event: DragEvent) => void fileTreeTab: () => "changes" | "all" setFileTreeTabValue: (value: string) => void diffsReady: boolean diffFiles: string[] kinds: Map activeDiff?: string focusReviewDiff: (path: string) => void }) { return ( ) }