дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-23 18:10:45 +02:00
Порівняти коміти
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
4256194f9e |
No files matched your search
@@ -54,10 +54,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
}
|
}
|
||||||
.statusActions > .changesToggle {
|
|
||||||
height: var(--h-control-small);
|
|
||||||
padding: 0 4px;
|
|
||||||
}
|
|
||||||
.statusText {
|
.statusText {
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -1230,33 +1226,6 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.changesToggle {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
height: var(--h-control);
|
|
||||||
padding: 0 8px;
|
|
||||||
border: 0;
|
|
||||||
border-radius: var(--radius-small);
|
|
||||||
background: transparent;
|
|
||||||
color: var(--fg-subtle);
|
|
||||||
font: inherit;
|
|
||||||
font-size: var(--fs-small);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.changesToggle:hover:not(:disabled) {
|
|
||||||
background: var(--bg-hover);
|
|
||||||
color: var(--fg-strong);
|
|
||||||
}
|
|
||||||
.changesToggle[aria-pressed="true"] {
|
|
||||||
background: var(--bg-selected);
|
|
||||||
color: var(--fg-strong);
|
|
||||||
}
|
|
||||||
.changesToggle:disabled {
|
|
||||||
opacity: 0.4;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* An open AskUserQuestion: every question with its options, answered at once above the composer. */
|
/* An open AskUserQuestion: every question with its options, answered at once above the composer. */
|
||||||
.questionCard {
|
.questionCard {
|
||||||
flex: none;
|
flex: none;
|
||||||
|
|||||||
@@ -272,20 +272,8 @@ function useLocalHead(status: AgentTask["status"] | null, root: string | null):
|
|||||||
return local ? head : null;
|
return local ? head : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The task's terminal and changes, at the end of its status line. */
|
/** The task's terminal, at the end of its status line. */
|
||||||
function StatusActions({
|
function StatusActions({ task }: { task: AgentTask }) {
|
||||||
task,
|
|
||||||
changes,
|
|
||||||
changesOpen,
|
|
||||||
onToggleChanges,
|
|
||||||
}: {
|
|
||||||
task: AgentTask;
|
|
||||||
changes: AgentChange[] | null;
|
|
||||||
changesOpen: boolean;
|
|
||||||
onToggleChanges: () => void;
|
|
||||||
}) {
|
|
||||||
const tx = useTx();
|
|
||||||
const count = changes?.length ?? 0;
|
|
||||||
return (
|
return (
|
||||||
<span className={styles.statusActions}>
|
<span className={styles.statusActions}>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -294,18 +282,6 @@ function StatusActions({
|
|||||||
title="Terminal"
|
title="Terminal"
|
||||||
onClick={() => void executeAction("terminal.openAt", task.cwd)}
|
onClick={() => void executeAction("terminal.openAt", task.cwd)}
|
||||||
/>
|
/>
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className={styles.changesToggle}
|
|
||||||
aria-pressed={changesOpen}
|
|
||||||
disabled={count === 0 && !changesOpen}
|
|
||||||
aria-label={changesOpen ? tx("Hide changes") : tx("Show changes")}
|
|
||||||
title={changesOpen ? tx("Hide changes") : tx("Show changes")}
|
|
||||||
onClick={onToggleChanges}
|
|
||||||
>
|
|
||||||
<Icon name="toolwindow-changes" size={14} />
|
|
||||||
{count > 0 && <span>{count}</span>}
|
|
||||||
</button>
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -315,16 +291,10 @@ function SessionStatus({
|
|||||||
task,
|
task,
|
||||||
entries,
|
entries,
|
||||||
head,
|
head,
|
||||||
changes,
|
|
||||||
changesOpen,
|
|
||||||
onToggleChanges,
|
|
||||||
}: {
|
}: {
|
||||||
task: AgentTask;
|
task: AgentTask;
|
||||||
entries: AgentEntry[] | null;
|
entries: AgentEntry[] | null;
|
||||||
head: string | null;
|
head: string | null;
|
||||||
changes: AgentChange[] | null;
|
|
||||||
changesOpen: boolean;
|
|
||||||
onToggleChanges: () => void;
|
|
||||||
}) {
|
}) {
|
||||||
const tx = useTx();
|
const tx = useTx();
|
||||||
const project = useProject((s) => s.project);
|
const project = useProject((s) => s.project);
|
||||||
@@ -357,7 +327,7 @@ function SessionStatus({
|
|||||||
{task.status === "limited" && task.resetsMs != null && ` · ${tx`resets ${formatSentAt(task.resetsMs)}`}`}
|
{task.status === "limited" && task.resetsMs != null && ` · ${tx`resets ${formatSentAt(task.resetsMs)}`}`}
|
||||||
</span>
|
</span>
|
||||||
<Meters task={task} entries={entries} />
|
<Meters task={task} entries={entries} />
|
||||||
<StatusActions task={task} changes={changes} changesOpen={changesOpen} onToggleChanges={onToggleChanges} />
|
<StatusActions task={task} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -2559,14 +2529,7 @@ function SessionComposer({
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div className={styles.composerArea}>
|
<div className={styles.composerArea}>
|
||||||
<SessionStatus
|
<SessionStatus task={task} entries={entries} head={head} />
|
||||||
task={task}
|
|
||||||
entries={entries}
|
|
||||||
head={head}
|
|
||||||
changes={changes}
|
|
||||||
changesOpen={changesOpen}
|
|
||||||
onToggleChanges={onToggleChanges}
|
|
||||||
/>
|
|
||||||
{task.status === "archived" && (
|
{task.status === "archived" && (
|
||||||
<div className={styles.banner}>
|
<div className={styles.banner}>
|
||||||
<span className={styles.bannerText}>
|
<span className={styles.bannerText}>
|
||||||
|
|||||||
@@ -1124,14 +1124,14 @@ describe("session state across tasks and hosts", () => {
|
|||||||
useAgents.setState({ docked: "A", sessionLocation: "toolWindow" });
|
useAgents.setState({ docked: "A", sessionLocation: "toolWindow" });
|
||||||
render(<AgentsView />);
|
render(<AgentsView />);
|
||||||
await screen.findByText("Answer A");
|
await screen.findByText("Answer A");
|
||||||
await waitFor(() => expect(screen.getByRole("button", { name: "Show changes" })).toBeEnabled());
|
await screen.findByRole("button", { name: /1 changed file/ });
|
||||||
expect(screen.queryByRole("complementary", { name: "Changes" })).toBeNull();
|
expect(screen.queryByRole("complementary", { name: "Changes" })).toBeNull();
|
||||||
const markVisible = vi.spyOn(await import("./store"), "markVisible");
|
const markVisible = vi.spyOn(await import("./store"), "markVisible");
|
||||||
vi.spyOn(document, "hasFocus").mockReturnValue(true);
|
vi.spyOn(document, "hasFocus").mockReturnValue(true);
|
||||||
const message = screen.getByRole("textbox", { name: "Message" });
|
const message = screen.getByRole("textbox", { name: "Message" });
|
||||||
fireEvent.change(message, { target: { value: "Draft to keep" } });
|
fireEvent.change(message, { target: { value: "Draft to keep" } });
|
||||||
const conversation = stream();
|
const conversation = stream();
|
||||||
fireEvent.click(screen.getByRole("button", { name: "Show changes" }));
|
fireEvent.click(screen.getByRole("button", { name: /1 changed file/ }));
|
||||||
expect(screen.getByRole("complementary", { name: "Changes" })).toBeVisible();
|
expect(screen.getByRole("complementary", { name: "Changes" })).toBeVisible();
|
||||||
expect(screen.getByText("Answer A")).not.toBeVisible();
|
expect(screen.getByText("Answer A")).not.toBeVisible();
|
||||||
expect(screen.queryByRole("textbox", { name: "Message" })).toBeNull();
|
expect(screen.queryByRole("textbox", { name: "Message" })).toBeNull();
|
||||||
|
|||||||
@@ -2016,7 +2016,6 @@
|
|||||||
"Show Commit in Git Log": "Mostrar confirmación en el registro de Git",
|
"Show Commit in Git Log": "Mostrar confirmación en el registro de Git",
|
||||||
"Show Container Log": "Mostrar registro del contenedor",
|
"Show Container Log": "Mostrar registro del contenedor",
|
||||||
"Show Context Actions": "Mostrar acciones de contexto",
|
"Show Context Actions": "Mostrar acciones de contexto",
|
||||||
"Show changes": "Mostrar cambios",
|
|
||||||
"Show Coverage": "Mostrar cobertura",
|
"Show Coverage": "Mostrar cobertura",
|
||||||
"Show Debug Tool Window": "Mostrar ventana de herramientas de depuración",
|
"Show Debug Tool Window": "Mostrar ventana de herramientas de depuración",
|
||||||
"Show Diff": "Mostrar diferencias",
|
"Show Diff": "Mostrar diferencias",
|
||||||
|
|||||||
@@ -1928,7 +1928,6 @@
|
|||||||
"Show Commit in Git Log": "Afficher le commit dans le journal Git",
|
"Show Commit in Git Log": "Afficher le commit dans le journal Git",
|
||||||
"Show Container Log": "Afficher le journal du conteneur",
|
"Show Container Log": "Afficher le journal du conteneur",
|
||||||
"Show Context Actions": "Afficher les actions contextuelles",
|
"Show Context Actions": "Afficher les actions contextuelles",
|
||||||
"Show changes": "Afficher les modifications",
|
|
||||||
"Show Coverage": "Afficher la couverture",
|
"Show Coverage": "Afficher la couverture",
|
||||||
"Show Debug Tool Window": "Afficher la fenêtre d'outil Débogage",
|
"Show Debug Tool Window": "Afficher la fenêtre d'outil Débogage",
|
||||||
"Show Diff": "Afficher le diff",
|
"Show Diff": "Afficher le diff",
|
||||||
|
|||||||
@@ -2072,7 +2072,6 @@
|
|||||||
"Show Commit in Git Log": "Git 로그에서 커밋 표시",
|
"Show Commit in Git Log": "Git 로그에서 커밋 표시",
|
||||||
"Show Container Log": "컨테이너 로그 표시",
|
"Show Container Log": "컨테이너 로그 표시",
|
||||||
"Show Context Actions": "컨텍스트 액션 표시",
|
"Show Context Actions": "컨텍스트 액션 표시",
|
||||||
"Show changes": "변경 사항 표시",
|
|
||||||
"Show Coverage": "커버리지 표시",
|
"Show Coverage": "커버리지 표시",
|
||||||
"Show Debug Tool Window": "디버그 도구 창 표시",
|
"Show Debug Tool Window": "디버그 도구 창 표시",
|
||||||
"Show Diff": "Diff 표시",
|
"Show Diff": "Diff 표시",
|
||||||
|
|||||||
@@ -2003,7 +2003,6 @@
|
|||||||
"Show Commit in Git Log": "Pokaż zatwierdzenie w dzienniku Git",
|
"Show Commit in Git Log": "Pokaż zatwierdzenie w dzienniku Git",
|
||||||
"Show Container Log": "Pokaż dziennik kontenera",
|
"Show Container Log": "Pokaż dziennik kontenera",
|
||||||
"Show Context Actions": "Pokaż akcje kontekstowe",
|
"Show Context Actions": "Pokaż akcje kontekstowe",
|
||||||
"Show changes": "Pokaż zmiany",
|
|
||||||
"Show Coverage": "Pokaż pokrycie kodu",
|
"Show Coverage": "Pokaż pokrycie kodu",
|
||||||
"Show Debug Tool Window": "Pokaż okno narzędziowe debugowania",
|
"Show Debug Tool Window": "Pokaż okno narzędziowe debugowania",
|
||||||
"Show Diff": "Pokaż różnice (Diff)",
|
"Show Diff": "Pokaż różnice (Diff)",
|
||||||
|
|||||||
@@ -2004,7 +2004,6 @@
|
|||||||
"Show Commit in Git Log": "Mostrar commit no log do Git",
|
"Show Commit in Git Log": "Mostrar commit no log do Git",
|
||||||
"Show Container Log": "Mostrar log do contêiner",
|
"Show Container Log": "Mostrar log do contêiner",
|
||||||
"Show Context Actions": "Mostrar ações de contexto",
|
"Show Context Actions": "Mostrar ações de contexto",
|
||||||
"Show changes": "Mostrar alterações",
|
|
||||||
"Show Coverage": "Mostrar cobertura",
|
"Show Coverage": "Mostrar cobertura",
|
||||||
"Show Debug Tool Window": "Mostrar janela de ferramentas de depuração",
|
"Show Debug Tool Window": "Mostrar janela de ferramentas de depuração",
|
||||||
"Show Diff": "Mostrar diff",
|
"Show Diff": "Mostrar diff",
|
||||||
|
|||||||
@@ -2364,7 +2364,6 @@
|
|||||||
"Show Commit in Git Log": "在 Git 日志中显示提交",
|
"Show Commit in Git Log": "在 Git 日志中显示提交",
|
||||||
"Show Container Log": "显示容器日志",
|
"Show Container Log": "显示容器日志",
|
||||||
"Show Context Actions": "显示上下文操作",
|
"Show Context Actions": "显示上下文操作",
|
||||||
"Show changes": "显示更改",
|
|
||||||
"Show Coverage": "显示覆盖率",
|
"Show Coverage": "显示覆盖率",
|
||||||
"Show Debug Tool Window": "显示调试工具窗口",
|
"Show Debug Tool Window": "显示调试工具窗口",
|
||||||
"Show Diff": "显示差异",
|
"Show Diff": "显示差异",
|
||||||
|
|||||||
Reference in new issue
Заблокувати користувача