@@ -1309,6 +1309,8 @@ assistantActionMenuItem // endDefinition
1309
1309
(* ::Section::Closed:: *)
1310
1310
(*Chat Notebook Conversion*)
1311
1311
1312
+ (* TODO: move more of this conversion functionality to ConvertChatNotebook *)
1313
+
1312
1314
(* ::**************************************************************************************************************:: *)
1313
1315
(* ::Subsection::Closed:: *)
1314
1316
(*popOutWorkspaceChatNB*)
@@ -1448,77 +1450,6 @@ popOutChatNB0[ id_, settings_Association ] := Enclose[
1448
1450
1449
1451
popOutChatNB0 // endDefinition ;
1450
1452
1451
- (* ::**************************************************************************************************************:: *)
1452
- (* ::Subsubsection::Closed:: *)
1453
- (*cellsToChatNB*)
1454
- cellsToChatNB // beginDefinition ;
1455
-
1456
- cellsToChatNB [ cells : { ___ Cell } ] :=
1457
- Notebook [ cells /. $fromWorkspaceChatConversionRules , StyleDefinitions -> "Chatbook.nb" ];
1458
-
1459
- cellsToChatNB [ cells : { ___ Cell }, settings_ Association ] :=
1460
- Module [ { dingbat , notebook },
1461
-
1462
- dingbat = Cell [ BoxData @ makeOutputDingbat @ settings , Background -> None ];
1463
- notebook = updateCellDingbats [ cellsToChatNB @ cells , dingbat ];
1464
-
1465
- Append [
1466
- notebook ,
1467
- TaggingRules -> < | "ChatNotebookSettings" -> KeyTake [ settings , $popOutSettings ] |>
1468
- ]
1469
- ];
1470
-
1471
- cellsToChatNB // endDefinition ;
1472
-
1473
-
1474
- $popOutSettings = {
1475
- "LLMEvaluator" ,
1476
- "MaxContextTokens" ,
1477
- "MaxToolResponses" ,
1478
- "Model"
1479
- };
1480
-
1481
- (* TODO: we should really have something better for this *)
1482
- $evaluatedChatInputDingbat = Cell [
1483
- BoxData @ DynamicBox @ ToBoxes [
1484
- If [ TrueQ @ CloudSystem ` $CloudNotebooks ,
1485
- RawBoxes @ TemplateBox [ { }, "ChatIconUser" ],
1486
- RawBoxes @ TemplateBox [ { }, "ChatInputCellDingbat" ]
1487
- ],
1488
- StandardForm
1489
- ],
1490
- Background -> None ,
1491
- CellFrame -> 0 ,
1492
- CellMargins -> 0
1493
- ];
1494
-
1495
-
1496
- $fromWorkspaceChatConversionRules := $fromWorkspaceChatConversionRules = Dispatch @ {
1497
- Cell [ BoxData @ TemplateBox [ { Cell [ TextData [ text_ ], ___ ] }, "UserMessageBox" , ___ ], "ChatInput" , ___ ] :>
1498
- Cell [ Flatten @ TextData @ text , "ChatInput" ]
1499
- ,
1500
- Cell [ BoxData @ TemplateBox [ { text_ }, "UserMessageBox" , ___ ], "ChatInput" , ___ ] :>
1501
- Cell [ Flatten @ TextData @ text , "ChatInput" ]
1502
- ,
1503
- Cell [ BoxData @ TemplateBox [ { Cell [ text_ , ___ ] }, "AssistantMessageBox" , ___ ], "ChatOutput" , ___ ] :>
1504
- Cell [ Flatten @ TextData @ text , "ChatOutput" ]
1505
- };
1506
-
1507
- (* ::**************************************************************************************************************:: *)
1508
- (* ::Subsubsection::Closed:: *)
1509
- (*updateCellDingbats*)
1510
- updateCellDingbats // beginDefinition ;
1511
-
1512
- updateCellDingbats [ cells_ , outputDingbat_ ] := ReplaceAll [
1513
- cells ,
1514
- {
1515
- Cell [ a__ , "ChatInput" , b___ ] :> Cell [ a , "ChatInput" , b , CellDingbat -> $evaluatedChatInputDingbat ],
1516
- Cell [ a__ , "ChatOutput" , b___ ] :> Cell [ a , "ChatOutput" , b , CellDingbat -> outputDingbat ]
1517
- }
1518
- ];
1519
-
1520
- updateCellDingbats // endDefinition ;
1521
-
1522
1453
(* ::**************************************************************************************************************:: *)
1523
1454
(* ::Section::Closed:: *)
1524
1455
(*Overlay Menus*)
@@ -2207,7 +2138,6 @@ $workspaceChatProgressBar = With[
2207
2138
(* ::Section::Closed:: *)
2208
2139
(*Package Footer*)
2209
2140
addToMXInitialization [
2210
- $fromWorkspaceChatConversionRules ;
2211
2141
$inlineToWorkspaceConversionRules ;
2212
2142
$defaultUserImage ;
2213
2143
$smallNotebookIcon ;
0 commit comments