@@ -524,58 +524,23 @@ export function useSettingsRestore(onRestored?: () => void) {
524524 } ;
525525}
526526
527- export function GeneralSettingsPanel ( ) {
527+ export function AppearanceSettingsPanel ( ) {
528528 const { theme, setTheme } = useTheme ( ) ;
529529 const settings = usePrimarySettings ( ) ;
530530 const updateSettings = useUpdatePrimarySettings ( ) ;
531531 const environmentStageLabel = useEnvironmentStageLabel ( ) ;
532532 const showEnvironmentIdentification =
533533 resolveEnvironmentIdentificationPillLabel ( environmentStageLabel ) !== null ;
534- const lastEnabledProjectGroupingMode = useRef < SidebarProjectGroupingMode > (
535- readLastEnabledProjectGroupingMode ( ) ,
536- ) ;
537- const observability = useAtomValue ( primaryServerObservabilityAtom ) ;
538- const serverProviders = useAtomValue ( primaryServerProvidersAtom ) ;
539534 const glassOpacityRatio =
540535 ( settings . glassOpacity - MIN_GLASS_OPACITY ) / ( MAX_GLASS_OPACITY - MIN_GLASS_OPACITY ) ;
541536 const glassOpacitySliderStyle = {
542537 "--glass-slider-progress" : `${ glassOpacityRatio * 100 } %` ,
543538 "--glass-slider-fill-offset" : `${ 0.5 - glassOpacityRatio } rem` ,
544539 } as CSSProperties ;
545- const diagnosticsDescription = formatDiagnosticsDescription ( {
546- localTracingEnabled : observability ?. localTracingEnabled ?? false ,
547- otlpTracesEnabled : observability ?. otlpTracesEnabled ?? false ,
548- otlpTracesUrl : observability ?. otlpTracesUrl ,
549- otlpMetricsEnabled : observability ?. otlpMetricsEnabled ?? false ,
550- otlpMetricsUrl : observability ?. otlpMetricsUrl ,
551- } ) ;
552-
553- const textGenerationModelSelection = resolveAppModelSelectionState ( settings , serverProviders ) ;
554- const textGenInstanceId = textGenerationModelSelection . instanceId ;
555- const textGenModel = textGenerationModelSelection . model ;
556- const textGenModelOptions = textGenerationModelSelection . options ;
557- const textGenerationModelInstanceEntries = sortProviderInstanceEntries (
558- applyProviderInstanceSettings ( deriveProviderInstanceEntries ( serverProviders ) , settings ) ,
559- ) ;
560- const textGenInstanceEntry = textGenerationModelInstanceEntries . find (
561- ( entry ) => entry . instanceId === textGenInstanceId ,
562- ) ;
563- const textGenProvider : ProviderDriverKind =
564- textGenInstanceEntry ?. driverKind ?? DEFAULT_DRIVER_KIND ;
565- const textGenerationModelOptionsByInstance = getCustomModelOptionsByInstance (
566- settings ,
567- serverProviders ,
568- textGenInstanceId ,
569- textGenModel ,
570- ) ;
571- const isTextGenerationModelDirty = ! Equal . equals (
572- settings . textGenerationModelSelection ?? null ,
573- DEFAULT_UNIFIED_SETTINGS . textGenerationModelSelection ?? null ,
574- ) ;
575540
576541 return (
577542 < SettingsPageContainer >
578- < SettingsSection title = "General " >
543+ < SettingsSection title = "Appearance " >
579544 < SettingsRow
580545 title = "Theme"
581546 description = "Choose how T3 Code looks across the app."
@@ -697,6 +662,76 @@ export function GeneralSettingsPanel() {
697662 />
698663 ) : null }
699664
665+ < SettingsRow
666+ title = "Word wrap"
667+ description = "Wrap long lines in code blocks, tables, diffs, and file previews by default."
668+ resetAction = {
669+ settings . wordWrap !== DEFAULT_UNIFIED_SETTINGS . wordWrap ? (
670+ < SettingResetButton
671+ label = "word wrapping"
672+ onClick = { ( ) =>
673+ updateSettings ( {
674+ wordWrap : DEFAULT_UNIFIED_SETTINGS . wordWrap ,
675+ } )
676+ }
677+ />
678+ ) : null
679+ }
680+ control = {
681+ < Switch
682+ checked = { settings . wordWrap }
683+ onCheckedChange = { ( checked ) => updateSettings ( { wordWrap : Boolean ( checked ) } ) }
684+ aria-label = "Wrap code, tables, diffs, and file previews by default"
685+ />
686+ }
687+ />
688+ </ SettingsSection >
689+ </ SettingsPageContainer >
690+ ) ;
691+ }
692+
693+ export function GeneralSettingsPanel ( ) {
694+ const settings = usePrimarySettings ( ) ;
695+ const updateSettings = useUpdatePrimarySettings ( ) ;
696+ const lastEnabledProjectGroupingMode = useRef < SidebarProjectGroupingMode > (
697+ readLastEnabledProjectGroupingMode ( ) ,
698+ ) ;
699+ const observability = useAtomValue ( primaryServerObservabilityAtom ) ;
700+ const serverProviders = useAtomValue ( primaryServerProvidersAtom ) ;
701+ const diagnosticsDescription = formatDiagnosticsDescription ( {
702+ localTracingEnabled : observability ?. localTracingEnabled ?? false ,
703+ otlpTracesEnabled : observability ?. otlpTracesEnabled ?? false ,
704+ otlpTracesUrl : observability ?. otlpTracesUrl ,
705+ otlpMetricsEnabled : observability ?. otlpMetricsEnabled ?? false ,
706+ otlpMetricsUrl : observability ?. otlpMetricsUrl ,
707+ } ) ;
708+
709+ const textGenerationModelSelection = resolveAppModelSelectionState ( settings , serverProviders ) ;
710+ const textGenInstanceId = textGenerationModelSelection . instanceId ;
711+ const textGenModel = textGenerationModelSelection . model ;
712+ const textGenModelOptions = textGenerationModelSelection . options ;
713+ const textGenerationModelInstanceEntries = sortProviderInstanceEntries (
714+ applyProviderInstanceSettings ( deriveProviderInstanceEntries ( serverProviders ) , settings ) ,
715+ ) ;
716+ const textGenInstanceEntry = textGenerationModelInstanceEntries . find (
717+ ( entry ) => entry . instanceId === textGenInstanceId ,
718+ ) ;
719+ const textGenProvider : ProviderDriverKind =
720+ textGenInstanceEntry ?. driverKind ?? DEFAULT_DRIVER_KIND ;
721+ const textGenerationModelOptionsByInstance = getCustomModelOptionsByInstance (
722+ settings ,
723+ serverProviders ,
724+ textGenInstanceId ,
725+ textGenModel ,
726+ ) ;
727+ const isTextGenerationModelDirty = ! Equal . equals (
728+ settings . textGenerationModelSelection ?? null ,
729+ DEFAULT_UNIFIED_SETTINGS . textGenerationModelSelection ?? null ,
730+ ) ;
731+
732+ return (
733+ < SettingsPageContainer >
734+ < SettingsSection title = "General" >
700735 < SettingsRow
701736 title = "Project Grouping"
702737 description = "Combine matching repositories across environments."
@@ -775,30 +810,6 @@ export function GeneralSettingsPanel() {
775810 }
776811 />
777812
778- < SettingsRow
779- title = "Word wrap"
780- description = "Wrap long lines in code blocks, tables, diffs, and file previews by default."
781- resetAction = {
782- settings . wordWrap !== DEFAULT_UNIFIED_SETTINGS . wordWrap ? (
783- < SettingResetButton
784- label = "word wrapping"
785- onClick = { ( ) =>
786- updateSettings ( {
787- wordWrap : DEFAULT_UNIFIED_SETTINGS . wordWrap ,
788- } )
789- }
790- />
791- ) : null
792- }
793- control = {
794- < Switch
795- checked = { settings . wordWrap }
796- onCheckedChange = { ( checked ) => updateSettings ( { wordWrap : Boolean ( checked ) } ) }
797- aria-label = "Wrap code, tables, diffs, and file previews by default"
798- />
799- }
800- />
801-
802813 < SettingsRow
803814 title = "Hide whitespace changes"
804815 description = "Set whether the diff panel ignores whitespace-only edits by default."
0 commit comments