@dahawa/hawa-code 1.38.2 → 1.38.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +526 -527
- package/hands.js +417 -418
- package/hawa.js +3 -3
- package/package.json +1 -1
- package/webServer/app.js +62 -49
- package/webServer/style.css +237 -0
package/webServer/style.css
CHANGED
|
@@ -459,3 +459,240 @@ html, body {
|
|
|
459
459
|
.auto-scroll-toggle:hover {
|
|
460
460
|
background: var(--bg-hover);
|
|
461
461
|
}
|
|
462
|
+
|
|
463
|
+
/* ============================================
|
|
464
|
+
Tool 结构化渲染样式
|
|
465
|
+
============================================ */
|
|
466
|
+
|
|
467
|
+
/* tool_use 详情区域 */
|
|
468
|
+
.tool-use-detail {
|
|
469
|
+
display: flex;
|
|
470
|
+
flex-wrap: wrap;
|
|
471
|
+
align-items: baseline;
|
|
472
|
+
gap: 6px;
|
|
473
|
+
font-size: 12px;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.tool-badge {
|
|
477
|
+
display: inline-block;
|
|
478
|
+
padding: 1px 6px;
|
|
479
|
+
border-radius: 3px;
|
|
480
|
+
font-size: 11px;
|
|
481
|
+
font-weight: 600;
|
|
482
|
+
color: #000;
|
|
483
|
+
background: var(--accent-purple);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.file-path {
|
|
487
|
+
color: var(--accent-blue);
|
|
488
|
+
word-break: break-all;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.tool-meta {
|
|
492
|
+
color: var(--text-dimmed);
|
|
493
|
+
font-size: 11px;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.tool-description {
|
|
497
|
+
color: var(--text-secondary);
|
|
498
|
+
font-size: 12px;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.pattern-text {
|
|
502
|
+
background: rgba(0, 0, 0, 0.3);
|
|
503
|
+
padding: 1px 4px;
|
|
504
|
+
border-radius: 3px;
|
|
505
|
+
color: var(--accent-yellow);
|
|
506
|
+
font-size: 12px;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/* 命令块 (Bash) */
|
|
510
|
+
.command-block {
|
|
511
|
+
background: rgba(0, 0, 0, 0.3);
|
|
512
|
+
padding: 4px 8px;
|
|
513
|
+
border-radius: 4px;
|
|
514
|
+
margin-top: 4px;
|
|
515
|
+
width: 100%;
|
|
516
|
+
overflow-x: auto;
|
|
517
|
+
font-size: 12px;
|
|
518
|
+
color: var(--text-primary);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.command-block code {
|
|
522
|
+
background: none;
|
|
523
|
+
padding: 0;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* Diff 内联预览 (Edit tool_use) */
|
|
527
|
+
.diff-preview-inline {
|
|
528
|
+
width: 100%;
|
|
529
|
+
margin-top: 4px;
|
|
530
|
+
font-size: 11px;
|
|
531
|
+
overflow-x: auto;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/* tool_result 详情区域 */
|
|
535
|
+
.tool-result-detail {
|
|
536
|
+
font-size: 12px;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.result-header {
|
|
540
|
+
display: flex;
|
|
541
|
+
flex-wrap: wrap;
|
|
542
|
+
align-items: baseline;
|
|
543
|
+
gap: 8px;
|
|
544
|
+
margin-bottom: 4px;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.result-status {
|
|
548
|
+
font-weight: 600;
|
|
549
|
+
font-size: 11px;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.result-status.status-success {
|
|
553
|
+
color: var(--accent-green);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.result-status.status-error {
|
|
557
|
+
color: var(--accent-red);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.result-status.status-warn {
|
|
561
|
+
color: var(--accent-yellow);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.result-status.status-info {
|
|
565
|
+
color: var(--accent-blue);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* 代码块 */
|
|
569
|
+
.code-block {
|
|
570
|
+
background: rgba(0, 0, 0, 0.3);
|
|
571
|
+
padding: 6px 8px;
|
|
572
|
+
border-radius: 4px;
|
|
573
|
+
margin-top: 4px;
|
|
574
|
+
max-height: 400px;
|
|
575
|
+
overflow: auto;
|
|
576
|
+
font-size: 12px;
|
|
577
|
+
line-height: 1.5;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.code-block code {
|
|
581
|
+
background: none;
|
|
582
|
+
padding: 0;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/* stderr 块 */
|
|
586
|
+
.stderr-block {
|
|
587
|
+
border-left: 2px solid var(--accent-red);
|
|
588
|
+
color: var(--accent-red);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/* 文件列表 */
|
|
592
|
+
.file-list {
|
|
593
|
+
list-style: none;
|
|
594
|
+
padding: 0;
|
|
595
|
+
margin: 4px 0 0 0;
|
|
596
|
+
max-height: 300px;
|
|
597
|
+
overflow-y: auto;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.file-item {
|
|
601
|
+
padding: 1px 0;
|
|
602
|
+
color: var(--accent-blue);
|
|
603
|
+
font-size: 12px;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.file-item::before {
|
|
607
|
+
content: ' ';
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/* 展开/收起 */
|
|
611
|
+
.expand-toggle {
|
|
612
|
+
color: var(--text-dimmed);
|
|
613
|
+
font-size: 11px;
|
|
614
|
+
cursor: pointer;
|
|
615
|
+
padding: 2px 0;
|
|
616
|
+
margin-top: 2px;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.expand-toggle:hover {
|
|
620
|
+
color: var(--accent-blue);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* Diff 视图 */
|
|
624
|
+
.diff-view {
|
|
625
|
+
background: rgba(0, 0, 0, 0.3);
|
|
626
|
+
border-radius: 4px;
|
|
627
|
+
margin-top: 4px;
|
|
628
|
+
padding: 4px 0;
|
|
629
|
+
overflow-x: auto;
|
|
630
|
+
font-size: 12px;
|
|
631
|
+
line-height: 1.5;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.diff-line {
|
|
635
|
+
display: flex;
|
|
636
|
+
padding: 0 8px;
|
|
637
|
+
white-space: pre-wrap;
|
|
638
|
+
word-break: break-all;
|
|
639
|
+
font-family: var(--font-mono);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.diff-line-no {
|
|
643
|
+
display: inline-block;
|
|
644
|
+
text-align: right;
|
|
645
|
+
color: var(--text-dimmed);
|
|
646
|
+
user-select: none;
|
|
647
|
+
flex-shrink: 0;
|
|
648
|
+
padding-right: 4px;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.diff-code {
|
|
652
|
+
flex: 1;
|
|
653
|
+
min-width: 0;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.diff-add {
|
|
657
|
+
color: var(--accent-green);
|
|
658
|
+
background: rgba(129, 199, 132, 0.1);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.diff-remove {
|
|
662
|
+
color: var(--accent-red);
|
|
663
|
+
background: rgba(239, 83, 80, 0.1);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.diff-context {
|
|
667
|
+
color: var(--text-dimmed);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.diff-separator {
|
|
671
|
+
color: var(--text-dimmed);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.diff-empty {
|
|
675
|
+
color: var(--text-dimmed);
|
|
676
|
+
font-size: 11px;
|
|
677
|
+
font-style: italic;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/* 远程工具 ☁ 标识(与 CLI 端 userFacingName "☁ Read" 一致) */
|
|
681
|
+
.message-tool-use.remote .tool-badge::before,
|
|
682
|
+
.message-tool-use.remote .tool-name::before {
|
|
683
|
+
content: '☁ ';
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.message-tool-result.remote .result-header::before {
|
|
687
|
+
content: '☁ ';
|
|
688
|
+
color: var(--text-dimmed);
|
|
689
|
+
font-size: 11px;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/* tool_result 纯文本降级 */
|
|
693
|
+
.tool-result-text {
|
|
694
|
+
white-space: pre-wrap;
|
|
695
|
+
word-break: break-all;
|
|
696
|
+
font-size: 12px;
|
|
697
|
+
color: var(--text-secondary);
|
|
698
|
+
}
|