@tutti-os/agent-gui 0.0.45 → 0.0.46

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.
@@ -6,9 +6,9 @@ import {
6
6
  projectAgentConversationVM,
7
7
  reconcileProjectedAgentConversationVM,
8
8
  useProjectedAgentConversation
9
- } from "../chunk-CZ7PS3DU.js";
9
+ } from "../chunk-BAQTM6VS.js";
10
10
  import "../chunk-QT45WUPQ.js";
11
- import "../chunk-ZG3WZSMV.js";
11
+ import "../chunk-FRG36S6N.js";
12
12
  import "../chunk-Y35GDLP2.js";
13
13
  import "../chunk-TXXWUG2J.js";
14
14
  import "../chunk-TYGL25EL.js";
@@ -89,12 +89,12 @@
89
89
  }
90
90
 
91
91
  .tsh-zoom-dialog [data-rmiz-modal-overlay="visible"] {
92
- background: color-mix(in srgb, var(--background-panel) 46%, transparent);
92
+ background: rgb(0 0 0 / 60%);
93
93
  backdrop-filter: blur(18px) saturate(1.02);
94
94
  }
95
95
 
96
96
  .tsh-zoom-dialog [data-rmiz-modal-overlay="hidden"] {
97
- background: color-mix(in srgb, var(--background-panel) 0%, transparent);
97
+ background: rgb(0 0 0 / 0%);
98
98
  }
99
99
 
100
100
  .tsh-zoom-dialog [data-rmiz-btn-unzoom] {
@@ -145,7 +145,7 @@
145
145
  justify-content: center;
146
146
  width: 32px;
147
147
  height: 32px;
148
- border-radius: 6px;
148
+ border-radius: 999px;
149
149
  background: var(--background-fronted);
150
150
  box-shadow:
151
151
  0 18px 40px color-mix(in srgb, black 26%, transparent),
@@ -3763,14 +3763,41 @@ aside.workspace-agents-status-panel
3763
3763
  color: inherit;
3764
3764
  }
3765
3765
 
3766
- .agent-gui-node__composer-textarea [data-slot="mention-pill"],
3766
+ .agent-gui-node__composer-textarea .agent-rich-text-mention-node {
3767
+ display: inline-flex;
3768
+ align-items: center;
3769
+ height: 24px;
3770
+ min-height: 24px;
3771
+ line-height: 24px;
3772
+ vertical-align: middle;
3773
+ }
3774
+
3767
3775
  .agent-gui-node__composer-textarea
3768
- [data-agent-file-mention="true"].tsh-agent-object-token {
3776
+ .agent-rich-text-mention-node[data-agent-file-mention="true"].tsh-agent-object-token,
3777
+ .agent-gui-node__composer-textarea
3778
+ .agent-rich-text-mention-node
3779
+ [data-slot="mention-pill"] {
3780
+ display: inline-flex;
3781
+ align-items: center;
3769
3782
  cursor: pointer;
3783
+ top: 0;
3784
+ height: 24px;
3785
+ min-height: 24px;
3786
+ padding-top: 0;
3770
3787
  padding-right: 4px;
3788
+ padding-bottom: 0;
3771
3789
  padding-left: 4px;
3772
3790
  border-radius: 4px;
3791
+ line-height: 24px;
3792
+ transform: none;
3773
3793
  transition: background-color 140ms ease-in-out;
3794
+ vertical-align: middle;
3795
+ }
3796
+
3797
+ .agent-gui-node__composer-textarea
3798
+ .agent-rich-text-mention-node
3799
+ [data-slot="mention-pill"] {
3800
+ height: 24px;
3774
3801
  }
3775
3802
 
3776
3803
  .agent-gui-node__composer-textarea
@@ -3850,7 +3877,7 @@ aside.workspace-agents-status-panel
3850
3877
 
3851
3878
  .agent-gui-node__composer-textarea
3852
3879
  [data-agent-file-mention="true"].tsh-agent-object-token--file {
3853
- vertical-align: baseline;
3880
+ vertical-align: middle;
3854
3881
  }
3855
3882
 
3856
3883
  .agent-gui-node__shell {
@@ -6205,7 +6232,7 @@ button.agent-gui-node__conversation-section-toggle:hover
6205
6232
  box-sizing: border-box;
6206
6233
  height: var(--agent-gui-composer-input-height, 56px);
6207
6234
  min-height: 56px;
6208
- max-height: var(--agent-gui-composer-input-max-height, 120px);
6235
+ max-height: var(--agent-gui-composer-input-max-height, 110px);
6209
6236
  align-items: center;
6210
6237
  overflow: hidden;
6211
6238
  padding: 0 12px;
@@ -6902,17 +6929,22 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
6902
6929
 
6903
6930
  .agent-gui-node__composer textarea,
6904
6931
  .agent-gui-node__composer-textarea {
6932
+ --agent-gui-composer-text-line-height: 24px;
6933
+ --agent-gui-composer-text-max-visible-lines: 3.5;
6934
+ /* prettier-ignore */
6935
+ --agent-gui-composer-text-viewport-height: calc(var(--agent-gui-composer-text-line-height) * var(--agent-gui-composer-text-max-visible-lines));
6936
+
6905
6937
  width: 100%;
6906
6938
  min-width: 0;
6907
6939
  min-height: 46px;
6908
- max-height: 72px;
6940
+ max-height: var(--agent-gui-composer-text-viewport-height);
6909
6941
  overflow-y: auto;
6910
6942
  border: 0;
6911
6943
  background: transparent;
6912
6944
  color: var(--agent-gui-text-primary);
6913
6945
  font: inherit;
6914
6946
  font-size: 13px;
6915
- line-height: 24px;
6947
+ line-height: var(--agent-gui-composer-text-line-height);
6916
6948
  outline: 0;
6917
6949
  padding: 0;
6918
6950
  resize: none;
@@ -6928,7 +6960,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
6928
6960
  display: block;
6929
6961
  height: auto;
6930
6962
  min-height: 24px;
6931
- max-height: calc(var(--agent-gui-composer-text-height, 56px) - 26px);
6963
+ max-height: var(--agent-gui-composer-text-viewport-height);
6932
6964
  overflow-x: hidden;
6933
6965
  overflow-y: auto;
6934
6966
  overflow-wrap: anywhere;
@@ -6943,12 +6975,18 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
6943
6975
  .agent-gui-node__composer[data-layout="dock"]
6944
6976
  .agent-gui-node__composer-prompt-input-area[data-has-draft-images="true"]
6945
6977
  .agent-gui-node__composer-textarea {
6946
- max-height: calc(var(--agent-gui-composer-text-height, 56px) - 26px);
6978
+ max-height: var(--agent-gui-composer-text-viewport-height);
6947
6979
  }
6948
6980
 
6981
+ .agent-gui-node__composer[data-layout="dock"]
6982
+ .agent-gui-node__composer-prompt-input-area:hover
6983
+ textarea,
6949
6984
  .agent-gui-node__composer[data-layout="dock"]
6950
6985
  .agent-gui-node__composer-prompt-input-area:hover
6951
6986
  .agent-gui-node__composer-textarea,
6987
+ .agent-gui-node__composer[data-layout="dock"]
6988
+ .agent-gui-node__composer-prompt-input-area:focus-within
6989
+ textarea,
6952
6990
  .agent-gui-node__composer[data-layout="dock"]
6953
6991
  .agent-gui-node__composer-prompt-input-area:focus-within
6954
6992
  .agent-gui-node__composer-textarea {
@@ -6958,8 +6996,9 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
6958
6996
  .agent-gui-node__composer[data-layout="dock"] textarea::-webkit-scrollbar,
6959
6997
  .agent-gui-node__composer[data-layout="dock"]
6960
6998
  .agent-gui-node__composer-textarea::-webkit-scrollbar {
6961
- display: none;
6962
- width: 4px;
6999
+ display: block;
7000
+ width: 0;
7001
+ height: 0;
6963
7002
  }
6964
7003
 
6965
7004
  .agent-gui-node__composer[data-layout="dock"]
@@ -6974,7 +7013,8 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
6974
7013
  .agent-gui-node__composer[data-layout="dock"]
6975
7014
  .agent-gui-node__composer-prompt-input-area:focus-within
6976
7015
  .agent-gui-node__composer-textarea::-webkit-scrollbar {
6977
- display: block;
7016
+ width: 4px;
7017
+ height: 4px;
6978
7018
  }
6979
7019
 
6980
7020
  .agent-gui-node__composer textarea::-webkit-scrollbar,
@@ -7057,7 +7097,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
7057
7097
  height: 0;
7058
7098
  color: var(--agent-gui-text-tertiary);
7059
7099
  font-size: 13px;
7060
- line-height: 1.3;
7100
+ line-height: 24px;
7061
7101
  pointer-events: none;
7062
7102
  }
7063
7103
 
@@ -7077,7 +7117,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
7077
7117
  .agent-gui-node__composer textarea::placeholder,
7078
7118
  .agent-gui-node__composer-textarea::placeholder {
7079
7119
  color: var(--agent-gui-text-tertiary);
7080
- line-height: 1.3;
7120
+ line-height: 24px;
7081
7121
  }
7082
7122
 
7083
7123
  .agent-gui-node__composer-input-shell:focus-within,
@@ -12,12 +12,13 @@ import {
12
12
  resolveWorkspaceLinkAction
13
13
  } from "./chunk-QT45WUPQ.js";
14
14
  import {
15
+ AGENT_RICH_TEXT_CARET_ANCHOR,
15
16
  attrsToMentionItem,
16
17
  createAgentFileMentionExtension,
17
18
  formatAgentMentionMarkdown,
18
19
  mentionItemToAttrs,
19
20
  parseAgentMentionMarkdown
20
- } from "./chunk-ZG3WZSMV.js";
21
+ } from "./chunk-FRG36S6N.js";
21
22
  import {
22
23
  fileChangeCountFromChanges,
23
24
  fileChangeEntriesFromChanges,
@@ -5284,6 +5285,9 @@ function createEmptyDocument() {
5284
5285
  content: [{ type: "paragraph" }]
5285
5286
  };
5286
5287
  }
5288
+ function isVisualLineStart(content) {
5289
+ return content.length === 0 || content.at(-1)?.type === "hardBreak";
5290
+ }
5287
5291
  function createParagraphFromText(text, options = {}) {
5288
5292
  const content = [];
5289
5293
  let index = 0;
@@ -5306,6 +5310,9 @@ function createParagraphFromText(text, options = {}) {
5306
5310
  const parsedMention = parseAgentMentionMarkdown(text, index);
5307
5311
  if (parsedMention) {
5308
5312
  flushTextBuffer();
5313
+ if (isVisualLineStart(content)) {
5314
+ content.push({ type: "text", text: AGENT_RICH_TEXT_CARET_ANCHOR });
5315
+ }
5309
5316
  content.push({
5310
5317
  type: "agentFileMention",
5311
5318
  // 转成规范 node attrs(如 workspace-reference 的 source/groupId/fileCount),
@@ -5383,7 +5390,7 @@ function isBlockPromptNode(node) {
5383
5390
  }
5384
5391
  function nodeToPromptText(node) {
5385
5392
  if (node.type === "text") {
5386
- return node.text ?? "";
5393
+ return (node.text ?? "").replaceAll(AGENT_RICH_TEXT_CARET_ANCHOR, "");
5387
5394
  }
5388
5395
  if (node.type === "agentFileMention") {
5389
5396
  return formatAgentMentionMarkdown(attrsToMentionItem(node.attrs ?? {}));
@@ -5603,7 +5610,9 @@ function isMentionOnlyRichTextDoc(doc) {
5603
5610
  if (paragraph?.type !== "paragraph") {
5604
5611
  return false;
5605
5612
  }
5606
- const inlineContent = paragraph.content ?? [];
5613
+ const inlineContent = (paragraph.content ?? []).filter(
5614
+ (node) => !(node.type === "text" && (node.text ?? "").replaceAll(AGENT_RICH_TEXT_CARET_ANCHOR, "").length === 0)
5615
+ );
5607
5616
  return inlineContent.length === 1 && inlineContent[0]?.type === "agentFileMention";
5608
5617
  }
5609
5618
  function plainTextToAgentRichTextDocWithWorkspaceAppIcons(value, availableSkills, workspaceAppIcons) {
@@ -12755,4 +12764,4 @@ export {
12755
12764
  AgentConversationFlow,
12756
12765
  useProjectedAgentConversation
12757
12766
  };
12758
- //# sourceMappingURL=chunk-CZ7PS3DU.js.map
12767
+ //# sourceMappingURL=chunk-BAQTM6VS.js.map