@@ -19,22 +19,22 @@ import org.jetbrains.jewel.ui.component.Icon
1919
2020/* *
2121 * Bottom toolbar for the input section.
22- * Provides send/stop buttons, @ trigger for agent completion, / command trigger, model selector, settings, and token info.
22+ * Provides send/stop buttons, model selector, settings, and token info.
2323 *
24- * Layout: Workspace - Token Info - ModelSelector - @ Symbol - / Symbol - Settings - Send Button
24+ * Layout: ModelSelector - Token Info | MCP Settings - Prompt Optimization - Send Button
25+ * - Left side: Model configuration (blends with background)
26+ * - Right side: MCP, prompt optimization, and send
2527 *
26- * Uses Jewel components for native IntelliJ IDEA look and feel .
28+ * Note: @ and / triggers are now in the top toolbar (IdeaTopToolbar) .
2729 */
2830@Composable
2931fun IdeaBottomToolbar (
3032 onSendClick : () -> Unit ,
3133 sendEnabled : Boolean ,
3234 isExecuting : Boolean = false,
3335 onStopClick : () -> Unit = {},
34- onAtClick : () -> Unit = {},
35- onSlashClick : () -> Unit = {},
3636 onSettingsClick : () -> Unit = {},
37- workspacePath : String? = null ,
37+ onPromptOptimizationClick : () -> Unit = {} ,
3838 totalTokens : Int? = null,
3939 // Model selector props
4040 availableConfigs : List <NamedModelConfig > = emptyList(),
@@ -46,74 +46,33 @@ fun IdeaBottomToolbar(
4646 Row (
4747 modifier = modifier
4848 .fillMaxWidth()
49- .padding(horizontal = 8 .dp, vertical = 6 .dp),
49+ .padding(horizontal = 4 .dp, vertical = 4 .dp),
5050 horizontalArrangement = Arrangement .SpaceBetween ,
5151 verticalAlignment = Alignment .CenterVertically
5252 ) {
53- // Left side: workspace and token info
53+ // Left side: Model selector and token info
5454 Row (
55- horizontalArrangement = Arrangement .spacedBy(8 .dp),
55+ horizontalArrangement = Arrangement .spacedBy(4 .dp),
5656 verticalAlignment = Alignment .CenterVertically ,
5757 modifier = Modifier .weight(1f , fill = false )
5858 ) {
59- // Workspace indicator
60- if (! workspacePath.isNullOrEmpty()) {
61- // Extract project name from path, handling both Unix and Windows separators
62- val projectName = workspacePath
63- .replace(' \\ ' , ' /' ) // Normalize to Unix separator
64- .substringAfterLast(' /' )
65- .ifEmpty { " Project" }
66-
67- Box (
68- modifier = Modifier
69- .clip(RoundedCornerShape (4 .dp))
70- .background(JewelTheme .globalColors.panelBackground.copy(alpha = 0.8f ))
71- .padding(horizontal = 8 .dp, vertical = 4 .dp)
72- ) {
73- Row (
74- verticalAlignment = Alignment .CenterVertically ,
75- horizontalArrangement = Arrangement .spacedBy(4 .dp)
76- ) {
77- Icon (
78- imageVector = IdeaComposeIcons .Folder ,
79- contentDescription = null ,
80- tint = JewelTheme .globalColors.text.normal,
81- modifier = Modifier .size(12 .dp)
82- )
83- Text (
84- text = projectName,
85- style = JewelTheme .defaultTextStyle.copy(fontSize = 12 .sp),
86- maxLines = 1
87- )
88- }
89- }
90- }
59+ // Model selector (transparent, blends with background)
60+ IdeaModelSelector (
61+ availableConfigs = availableConfigs,
62+ currentConfigName = currentConfigName,
63+ onConfigSelect = onConfigSelect,
64+ onConfigureClick = onConfigureClick
65+ )
9166
92- // Token usage indicator
67+ // Token usage indicator (subtle)
9368 if (totalTokens != null && totalTokens > 0 ) {
94- Box (
95- modifier = Modifier
96- .clip(RoundedCornerShape (4 .dp))
97- .background(AutoDevColors .Blue .c400.copy(alpha = 0.2f ))
98- .padding(horizontal = 8 .dp, vertical = 4 .dp)
99- ) {
100- Row (
101- verticalAlignment = Alignment .CenterVertically ,
102- horizontalArrangement = Arrangement .spacedBy(4 .dp)
103- ) {
104- Text (
105- text = " Token" ,
106- style = JewelTheme .defaultTextStyle.copy(fontSize = 11 .sp)
107- )
108- Text (
109- text = " $totalTokens " ,
110- style = JewelTheme .defaultTextStyle.copy(
111- fontSize = 11 .sp,
112- fontWeight = FontWeight .Bold
113- )
114- )
115- }
116- }
69+ Text (
70+ text = " ${totalTokens} t" ,
71+ style = JewelTheme .defaultTextStyle.copy(
72+ fontSize = 11 .sp,
73+ color = JewelTheme .globalColors.text.normal.copy(alpha = 0.6f )
74+ )
75+ )
11776 }
11877 }
11978
@@ -122,49 +81,27 @@ fun IdeaBottomToolbar(
12281 horizontalArrangement = Arrangement .spacedBy(4 .dp),
12382 verticalAlignment = Alignment .CenterVertically
12483 ) {
125- // Model selector
126- IdeaModelSelector (
127- availableConfigs = availableConfigs,
128- currentConfigName = currentConfigName,
129- onConfigSelect = onConfigSelect,
130- onConfigureClick = onConfigureClick
131- )
132-
133- // @ trigger button for agent completion
84+ // MCP Settings button
13485 IconButton (
135- onClick = onAtClick ,
86+ onClick = onSettingsClick ,
13687 modifier = Modifier .size(32 .dp)
13788 ) {
13889 Icon (
139- imageVector = IdeaComposeIcons .AlternateEmail ,
140- contentDescription = " @ Agent " ,
90+ imageVector = IdeaComposeIcons .Settings ,
91+ contentDescription = " MCP Settings " ,
14192 tint = JewelTheme .globalColors.text.normal,
142- modifier = Modifier .size(18 .dp)
143- )
144- }
145-
146- // / trigger button for slash commands
147- IconButton (
148- onClick = onSlashClick,
149- modifier = Modifier .size(32 .dp)
150- ) {
151- Text (
152- text = " /" ,
153- style = JewelTheme .defaultTextStyle.copy(
154- fontSize = 16 .sp,
155- fontWeight = FontWeight .Bold
156- )
93+ modifier = Modifier .size(16 .dp)
15794 )
15895 }
15996
160- // Settings button
97+ // Prompt Optimization button
16198 IconButton (
162- onClick = onSettingsClick ,
99+ onClick = onPromptOptimizationClick ,
163100 modifier = Modifier .size(32 .dp)
164101 ) {
165102 Icon (
166- imageVector = IdeaComposeIcons .Settings ,
167- contentDescription = " Settings " ,
103+ imageVector = IdeaComposeIcons .AutoAwesome ,
104+ contentDescription = " Prompt Optimization " ,
168105 tint = JewelTheme .globalColors.text.normal,
169106 modifier = Modifier .size(16 .dp)
170107 )
0 commit comments