@@ -18,8 +18,7 @@ import {
18
18
} from "antd" ;
19
19
import { CSSProperties , useEffect , useMemo , useState } from "react" ;
20
20
import { Entries } from "type-fest" ;
21
-
22
- import { CSS , useAsyncEffect } from "@cocalc/frontend/app-framework" ;
21
+ import { useAsyncEffect } from "@cocalc/frontend/app-framework" ;
23
22
import getChatActions from "@cocalc/frontend/chat/get-actions" ;
24
23
import { A , Paragraph , RawPrompt , Text } from "@cocalc/frontend/components" ;
25
24
import AIAvatar from "@cocalc/frontend/components/ai-avatar" ;
@@ -38,7 +37,6 @@ import track from "@cocalc/frontend/user-tracking";
38
37
import { LLMTools } from "@cocalc/jupyter/types" ;
39
38
import { LanguageModel } from "@cocalc/util/db-schema/llm-utils" ;
40
39
import { capitalize , getRandomColor , unreachable } from "@cocalc/util/misc" ;
41
- import { COLORS } from "@cocalc/util/theme" ;
42
40
import { JupyterActions } from "../browser-actions" ;
43
41
import { CODE_BAR_BTN_STYLE } from "../consts" ;
44
42
import { cellOutputToText } from "../output-messages/ansi" ;
@@ -48,7 +46,6 @@ interface Props {
48
46
id : string ;
49
47
style ?: CSSProperties ;
50
48
llmTools ?: LLMTools ;
51
- is_current ?: boolean ;
52
49
}
53
50
54
51
const CONTENT_WIDTH = 600 ;
@@ -213,7 +210,6 @@ export function LLMCellTool({
213
210
id,
214
211
style,
215
212
llmTools,
216
- is_current,
217
213
} : Props ) {
218
214
const { actions : project_actions , onCoCalcCom } = useProjectContext ( ) ;
219
215
const { project_id, path } = useFrameContext ( ) ;
@@ -388,13 +384,6 @@ export function LLMCellTool({
388
384
}
389
385
390
386
function renderDropdown ( ) {
391
- const txtStyle : CSS = is_current
392
- ? {
393
- color : COLORS . AI_ASSISTANT_FONT ,
394
- fontWeight : "bold" ,
395
- }
396
- : { } ;
397
-
398
387
return (
399
388
< Dropdown
400
389
trigger = { [ "click" ] }
@@ -406,7 +395,8 @@ export function LLMCellTool({
406
395
key : mode ,
407
396
label : (
408
397
< Tooltip title = { action . descr } placement = { "left" } >
409
- < Icon name = { action . icon } /> { capitalize ( mode ) }
398
+ < Icon name = { action . icon } style = { { marginRight : "5px" } } /> { " " }
399
+ { capitalize ( mode ) }
410
400
</ Tooltip >
411
401
) ,
412
402
onClick : ( ) => setMode ( mode as Mode ) ,
@@ -415,22 +405,16 @@ export function LLMCellTool({
415
405
) ,
416
406
} }
417
407
>
418
- < Tooltip title = "Use AI assistance on this cell" >
408
+ < Tooltip title = "Use AI assitant on this cell" >
419
409
< Button
420
410
disabled = { isQuerying }
421
411
type = "text"
422
412
size = "small"
423
413
style = { CODE_BAR_BTN_STYLE }
424
- icon = {
425
- < AIAvatar
426
- size = { 14 }
427
- style = { { top : "1px" } }
428
- iconColor = { is_current ? COLORS . AI_ASSISTANT_FONT : undefined }
429
- />
430
- }
414
+ icon = { < AIAvatar size = { 14 } style = { { top : "1px" } } /> }
431
415
>
432
416
< Space size = "small" >
433
- < span style = { txtStyle } > Tools </ span >
417
+ Assistant
434
418
< Icon name = "angle-down" />
435
419
</ Space >
436
420
</ Button >
0 commit comments