[eric] tree: group ChatInput into hooks/model-picker/view/toolbar

This commit is contained in:
ciregenz
2026-05-23 12:41:54 -07:00
parent 320052c71e
commit 4f1ef0bae6
27 changed files with 27 additions and 27 deletions
@@ -6,15 +6,15 @@ import { serializeEditorContent, AttachedSkill } from '@/app/components/richEdit
import { useAppDispatch, useAppSelector } from '@/shared/hooks';
import { fetchModes } from '@/shared/state/modesSlice';
import { useClaudeTokens } from '@/shared/styles/ThemeContext';
import { useChatInputModel } from './ChatInput/useChatInputModel';
import { useDraftLoad, deleteDraft, loadDraft } from './ChatInput/draftStore';
import { handleSlashCommand } from './ChatInput/slashCommands';
import { useChatInputModel } from './ChatInput/hooks/useChatInputModel';
import { useDraftLoad, deleteDraft, loadDraft } from './ChatInput/hooks/draftStore';
import { handleSlashCommand } from './ChatInput/hooks/slashCommands';
import { materializeImages, appendSelectedElements, computeSendBlock } from './ChatInput/sendHelpers';
import { useImageAttachments } from './ChatInput/useImageAttachments';
import { useContextFiles } from './ChatInput/useContextFiles';
import { useModelPicker } from './ChatInput/useModelPicker';
import { useEditorHandlers } from './ChatInput/useEditorHandlers';
import { ChatInputView } from './ChatInput/ChatInputView';
import { useImageAttachments } from './ChatInput/hooks/useImageAttachments';
import { useContextFiles } from './ChatInput/hooks/useContextFiles';
import { useModelPicker } from './ChatInput/hooks/useModelPicker';
import { useEditorHandlers } from './ChatInput/hooks/useEditorHandlers';
import { ChatInputView } from './ChatInput/view/ChatInputView';
import { ICON_MAP, FALLBACK_MODE_BASE } from './ChatInput/modeConfig';
import { AttachedImage, ForcedToolGroup, ChatInputHandle } from './ChatInput/types';
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import { useAppSelector } from '@/shared/hooks';
import { sortModelsForPicker } from './modelPicker';
import { sortModelsForPicker } from '../model-picker/modelPicker';
const FALLBACK_MODELS = [
{ value: 'sonnet', label: 'Claude Sonnet 4.6', context_window: 1_000_000, reasoning: true },
@@ -1,8 +1,8 @@
import { useState, useCallback, useEffect, useMemo } from 'react';
import { ContextPath } from '@/app/components/DirectoryBrowser';
import { API_BASE, getAuthToken } from '@/shared/config';
import { ForcedToolGroup } from './types';
import { basename } from './helpers';
import { ForcedToolGroup } from '../types';
import { basename } from '../helpers';
export type SendBlock = null | {
estimate: number;
@@ -14,7 +14,7 @@ import { clearSessionMessages } from '@/shared/state/agentsSlice';
import { scheduleDraftSave } from './draftStore';
import { handleSlashCommand } from './slashCommands';
import { tryPasteClipboardCards } from './pasteCards';
import { ForcedToolGroup } from './types';
import { ForcedToolGroup } from '../types';
type Skill = { id: string; name: string; content: string };
@@ -1,5 +1,5 @@
import { useState, useRef, useCallback, useEffect } from 'react';
import { AttachedImage } from './types';
import { AttachedImage } from '../types';
export function useImageAttachments() {
const [images, setImages] = useState<AttachedImage[]>([]);
@@ -11,7 +11,7 @@ import {
COST_STEPS,
readLS,
writeLS,
} from './modelPicker';
} from '../model-picker/modelPicker';
type CapFilters = { reasoning: boolean; subscription: boolean; apiKey: boolean };
@@ -8,7 +8,7 @@ import Collapse from '@mui/material/Collapse';
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
import { ClaudeTokens } from '@/shared/styles/claudeTokens';
import { PROVIDER_COLORS, OR_AUTO_COLLAPSE_THRESHOLD } from './modelPicker';
import { formatTokenCount } from './helpers';
import { formatTokenCount } from '../helpers';
import { ModelPickerRecents } from './ModelPickerRecents';
interface Props {
@@ -2,7 +2,7 @@ import { SelectedElement } from '@/app/components/ElementSelectionContext';
import { getWebview } from '@/shared/browserRegistry';
import { ContextPath } from '@/app/components/DirectoryBrowser';
import { AttachedImage } from './types';
import { SendBlock } from './useContextFiles';
import { SendBlock } from './hooks/useContextFiles';
type OutImage = { data: string; media_type: string };
@@ -4,10 +4,10 @@ import { useElementSelection } from '@/app/components/ElementSelectionContext';
import { ClaudeTokens } from '@/shared/styles/claudeTokens';
import { ContextRing } from './ContextRing';
import { ModeControl } from './ModeControl';
import { ModelPickerMenu } from './ModelPickerMenu';
import { ModelPickerMenu } from '../model-picker/ModelPickerMenu';
import { ThinkingLevelControl } from './ThinkingLevelControl';
import { ToolbarActions } from './ToolbarActions';
import { ModelPickerState } from './useModelPicker';
import { ModelPickerState } from '../hooks/useModelPicker';
type ThinkingLevel = 'off' | 'low' | 'medium' | 'high' | 'auto';
@@ -1,7 +1,7 @@
import React from 'react';
import Box from '@mui/material/Box';
import Tooltip from '@mui/material/Tooltip';
import { formatTokenCount } from './helpers';
import { formatTokenCount } from '../helpers';
export const ContextRing: React.FC<{ used: number; limit: number; accentColor: string; trackColor: string }> = ({ used, limit, accentColor, trackColor }) => {
if (used === 0) return null;
@@ -11,8 +11,8 @@ import { getToolGroupIcon } from '@/app/components/CommandPicker';
import { SelectedElement } from '@/app/components/ElementSelectionContext';
import { ContextPath } from '@/app/components/DirectoryBrowser';
import { ClaudeTokens } from '@/shared/styles/claudeTokens';
import { AttachedImage, ForcedToolGroup } from './types';
import { formatTokenCount, pathTail } from './helpers';
import { AttachedImage, ForcedToolGroup } from '../types';
import { formatTokenCount, pathTail } from '../helpers';
interface ElementSelectionLike {
removeOwnerElement: (ownerId: string, id: string) => void;
@@ -6,7 +6,7 @@ import Snackbar from '@mui/material/Snackbar';
import Alert from '@mui/material/Alert';
import CloseIcon from '@mui/icons-material/Close';
import { ClaudeTokens } from '@/shared/styles/claudeTokens';
import { formatTokenCount } from './helpers';
import { formatTokenCount } from '../helpers';
interface Props {
c: ClaudeTokens;
@@ -9,13 +9,13 @@ import { SelectedElement } from '@/app/components/ElementSelectionContext';
import { ContextPath } from '@/app/components/DirectoryBrowser';
import { ClaudeTokens } from '@/shared/styles/claudeTokens';
import { TriggerState } from '@/app/components/richEditorUtils';
import { AttachedImage, ForcedToolGroup } from './types';
import { SendBlock } from './useContextFiles';
import { ModelPickerState } from './useModelPicker';
import { AttachedImage, ForcedToolGroup } from '../types';
import { SendBlock } from '../hooks/useContextFiles';
import { ModelPickerState } from '../hooks/useModelPicker';
import { SendBlockBanner } from './SendBlockBanner';
import { AttachmentChips } from './AttachmentChips';
import { EditorSurface } from './EditorSurface';
import { ChatInputToolbar } from './ChatInputToolbar';
import { ChatInputToolbar } from '../toolbar/ChatInputToolbar';
import { ChatInputOverlays } from './ChatInputOverlays';
type ThinkingLevel = 'off' | 'low' | 'medium' | 'high' | 'auto';
@@ -4,7 +4,7 @@ import Typography from '@mui/material/Typography';
import { ContextPath } from '@/app/components/DirectoryBrowser';
import { API_BASE, getAuthToken } from '@/shared/config';
import { ClaudeTokens } from '@/shared/styles/claudeTokens';
import { SendBlock } from './useContextFiles';
import { SendBlock } from '../hooks/useContextFiles';
interface Props {
sendBlock: NonNullable<SendBlock>;