fix(agents): Composer input-method Enter, autocorrect and task header layout

- Enter that commits an input-method candidate no longer sends the message.
- The composer turns off autocorrect, autocapitalisation and spellcheck, which
  popped up correction bubbles over prompts.
- The provider icon in the task header sits inline with the details instead of
  on its own line above them.
Цей коміт міститься в:
l0ng-ai committed 2026-10-27 17:16:46 +08:00
1 джерело f73c0a6b1d
коміт 145f168525
3 files changed
+19 -9

No files matched your search

+5 -1
Переглянути файл
@@ -28,6 +28,7 @@ import {
} from "./composerModel";
import { composerDraft, updateComposer, useAgents } from "./store";
import styles from "./Composer.module.css";
import { isImeKey } from "@/platform/ime";
const MAX_PROMPT_HEIGHT = 280;
const MAX_ITEMS = 12;
@@ -213,7 +214,7 @@ export function Composer(props: ComposerProps) {
}, [id, root]);
const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {
if (e.nativeEvent.isComposing) return;
if (isImeKey(e.nativeEvent)) return;
if (open) {
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
e.preventDefault();
@@ -320,6 +321,9 @@ export function Composer(props: ComposerProps) {
ref={ref}
className={styles.textarea}
rows={2}
spellCheck={false}
autoCorrect="off"
autoCapitalize="off"
value={text}
aria-label={tx("Message")}
placeholder={tx(props.placeholder)}
+6 -2
Переглянути файл
@@ -38,14 +38,18 @@
.headerDetail {
flex: 1 1 0;
min-width: 0;
display: flex;
align-items: center;
gap: 4px;
color: var(--fg-subtle);
}
.headerText {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.providerIcon {
vertical-align: -2px;
margin-right: 4px;
color: var(--fg-muted);
}
.muted {
+8 -6
Переглянути файл
@@ -68,12 +68,14 @@ function Header({ task }: { task: AgentTask }) {
</span>
<span className={styles.headerDetail} title={task.cwd}>
<Icon name={providerIcon(task.provider)} size={13} className={styles.providerIcon} />
{providerName(task.provider)}
{task.model ? ` · ${task.model}` : ""}
{" · "}
{where ?? <T>Local checkout</T>}
{" · "}
<T>{statusLabel(task.status)}</T>
<span className={styles.headerText}>
{providerName(task.provider)}
{task.model ? ` · ${task.model}` : ""}
{" · "}
{where ?? <T>Local checkout</T>}
{" · "}
<T>{statusLabel(task.status)}</T>
</span>
</span>
{task.usage && <Usage task={task} />}
{busy && <IconButton icon="stop" title="Stop" size="small" onClick={() => void cancelTask(task.id)} />}