Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/prd-8632-drop-mode-from-composer-header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@inkeep/open-knowledge": patch
---

The agent settings control no longer repeats the permission mode. It shows the model, Fast mode and reasoning effort, and the mode stays in the menu where it is chosen.
49 changes: 16 additions & 33 deletions packages/app/src/components/acp/ThreadView.dom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -855,18 +855,20 @@ describe('ThreadView chat header', () => {
expect(label).not.toContain('Opus 5, Fast');
});

test('a permissive mode is named in the header rather than coloured as a warning', () => {
render(<ThreadView info={headerInfo({ mode: 'bypassPermissions', effort: 'max' })} />);
expect(screen.queryByTestId('agent-thread-mode-accent')).toBeNull();
expect(screen.getByTestId('agent-thread-permissive-mode').textContent).toBe(
'Acts without asking',
);
expect(
screen.getByRole('button', { name: /^Agent settings/ }).getAttribute('aria-label'),
).toContain('Acts without asking');
});
test.each(['default', 'acceptEdits', 'bypassPermissions'])(
'the %s mode reaches the header neither as text nor as a colour',
(mode) => {
render(<ThreadView info={headerInfo({ mode, effort: 'max' })} />);

test('the mode is still named, and disclosed once, when it is the primary select', () => {
expect(screen.queryByTestId('agent-thread-mode-accent')).toBeNull();
expect(screen.queryByTestId('agent-thread-permissive-mode')).toBeNull();
expect(
screen.getByRole('button', { name: /^Agent settings/ }).getAttribute('aria-label'),
).toBe('Agent settings — Opus 5, Max');
},
);

test('a mode-only agent still names its mode, since that is the only select there is', () => {
render(
<ThreadView
info={makeInfo({
Expand All @@ -888,13 +890,9 @@ describe('ThreadView chat header', () => {
/>,
);
const trigger = screen.getByRole('button', { name: /^Agent settings/ });
expect(trigger.textContent).toBe('Bypass permissionsActs without asking');
expect(screen.getByTestId('agent-thread-permissive-mode').textContent).toBe(
'Acts without asking',
);
expect(trigger.getAttribute('aria-label')).toBe(
'Agent settings — Bypass permissions, Acts without asking',
);
expect(trigger.textContent).toBe('Bypass permissions');
expect(screen.queryByTestId('agent-thread-permissive-mode')).toBeNull();
expect(trigger.getAttribute('aria-label')).toBe('Agent settings — Bypass permissions');
});

test('a default effort is named, not described with the menu sentence', () => {
Expand Down Expand Up @@ -933,21 +931,6 @@ describe('ThreadView chat header', () => {
);
});

test('a working-directory-scoped mode is disclosed too, not only a full bypass', () => {
render(<ThreadView info={headerInfo({ mode: 'acceptEdits', effort: 'max' })} />);
expect(screen.getByTestId('agent-thread-permissive-mode').textContent).toBe(
'Acts without asking',
);
expect(screen.getByRole('button', { name: /^Agent settings/ }).getAttribute('aria-label')).toBe(
'Agent settings — Opus 5, Acts without asking, Max',
);
});

test('an ordinary mode is not named, so the chip means something', () => {
render(<ThreadView info={headerInfo({ effort: 'max' })} />);
expect(screen.queryByTestId('agent-thread-permissive-mode')).toBeNull();
});

test('the hover text carries the state the accessible name carries', async () => {
const user = userEvent.setup();
render(<ThreadView info={headerInfo({ effort: 'max', fast: true })} />);
Expand Down
21 changes: 3 additions & 18 deletions packages/app/src/components/acp/ThreadView.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utility

import { deriveAgentPosture } from '@inkeep/open-knowledge-core/acp/agent-posture';
import { isPermissiveMode } from '@inkeep/open-knowledge-core/acp/permissive-mode';
import type {
AttachmentPart,
QueuedMessage,
Expand Down Expand Up @@ -1537,9 +1536,6 @@ function AgentSettingsPopover({
(option): option is BooleanConfigOption =>
option.type === 'boolean' && option.category === 'model_config' && /fast/i.test(option.id),
);
const actsWithoutAsking =
modeSurface !== null &&
isPermissiveMode({ id: modeSurface.currentId, name: modeSurface.currentName });
const triggerText =
primarySelect !== undefined
? selectOptionHeaderText(primarySelect)
Expand All @@ -1550,12 +1546,9 @@ function AgentSettingsPopover({
: null;
const fastOn = fastToggle?.currentValue === true;
const headerSummary = formatUnitList(
[
triggerText,
actsWithoutAsking ? t`Acts without asking` : null,
fastOn ? t`Fast` : null,
effortText,
].filter((part): part is string => part !== null),
[triggerText, fastOn ? t`Fast` : null, effortText].filter(
(part): part is string => part !== null,
),
i18n.locale,
);
const settingsLabel =
Expand All @@ -1576,14 +1569,6 @@ function AgentSettingsPopover({
data-testid="agent-thread-settings"
>
<span className="min-w-0 truncate">{triggerText}</span>
{actsWithoutAsking ? (
<span
className="shrink-0 text-muted-foreground"
data-testid="agent-thread-permissive-mode"
>
{t`Acts without asking`}
</span>
) : null}
{fastOn ? (
<span className="shrink-0 text-muted-foreground" data-testid="agent-thread-fast">
{t`Fast`}
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/ar/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5845,7 +5845,6 @@
"uoJF_D": ["كان إعداده أو البدء به صعبًا جدًا"],
"ur2XSb": ["المحرر المرئي"],
"uuoHOU": ["فشل الأمر."],
"uv4Owp": ["يتصرف دون سؤال"],
"uwzRx4": [
"اضبط حجم طلب الفهرسة ومهلته لخوادم التضمينات البطيئة أو المحدودة الذاكرة. ينبغي لمعظم الإعدادات الإبقاء على القيم الافتراضية."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/ar/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "يظهر هنا محتوى اللوحة النشطة للتبويب ال
msgid "Activity"
msgstr "النشاط"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "يتصرف دون سؤال"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/bn/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4971,7 +4971,6 @@
"uoJF_D": ["এটি সেট আপ করা বা শুরু করা খুব কঠিন ছিল"],
"ur2XSb": ["দৃশ্য সম্পাদক"],
"uuoHOU": ["কমান্ড ব্যর্থ।"],
"uv4Owp": ["না জিজ্ঞেস করেই কাজ করে"],
"uwzRx4": [
"ধীর বা কম মেমোরির এমবেডিং সার্ভারের জন্য ইনডেক্সিং অনুরোধের আকার ও সময়সীমা সমন্বয় করুন। বেশিরভাগ ক্ষেত্রে ডিফল্ট মানই রাখা উচিত।"
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/bn/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,10 +1580,6 @@ msgstr "নির্বাচিত ট্যাবের সক্রিয়
msgid "Activity"
msgstr "কার্যকলাপ"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "না জিজ্ঞেস করেই কাজ করে"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5156,7 +5156,6 @@
"uoJF_D": ["It was too hard to set up or get started"],
"ur2XSb": ["Visual editor"],
"uuoHOU": ["Command failed."],
"uv4Owp": ["Acts without asking"],
"uwzRx4": [
"Adjust indexing request size and timeout for slow or memory-constrained embedding servers. Most setups should keep the defaults."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "Active panel content for the selected tab shows here."
msgid "Activity"
msgstr "Activity"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "Acts without asking"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5938,7 +5938,6 @@
"uoJF_D": ["Era demasiado difícil de configurar o de empezar a usar"],
"ur2XSb": ["Editor visual"],
"uuoHOU": ["El comando falló."],
"uv4Owp": ["Actúa sin preguntar"],
"uwzRx4": [
"Ajusta el tamaño y el tiempo de espera de las solicitudes de indexación para servidores de embeddings lentos o con poca memoria. La mayoría de las configuraciones deberían mantener los valores predeterminados."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "Aquí se muestra el contenido del panel activo de la pestaña selecciona
msgid "Activity"
msgstr "Actividad"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "Actúa sin preguntar"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6000,7 +6000,6 @@
"uoJF_D": ["C'était trop compliqué à installer ou à prendre en main"],
"ur2XSb": ["Éditeur visuel"],
"uuoHOU": ["La commande a échoué."],
"uv4Owp": ["Agit sans demander"],
"uwzRx4": [
"Ajustez la taille et le délai d'attente des requêtes d'indexation pour les serveurs d'embeddings lents ou limités en mémoire. La plupart des configurations devraient conserver les valeurs par défaut."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "Le contenu du panneau actif de l'onglet sélectionné s'affiche ici."
msgid "Activity"
msgstr "Activité"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "Agit sans demander"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/hi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4963,7 +4963,6 @@
"uoJF_D": ["इसे सेट अप करना या शुरू करना बहुत कठिन था"],
"ur2XSb": ["दृश्य संपादक"],
"uuoHOU": ["कमांड विफल।"],
"uv4Owp": ["बिना पूछे काम करता है"],
"uwzRx4": [
"धीमे या कम मेमोरी वाले एम्बेडिंग सर्वर के लिए इंडेक्सिंग अनुरोध का आकार और टाइमआउट समायोजित करें। अधिकांश सेटअप में डिफ़ॉल्ट मान ही रखने चाहिए।"
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/hi/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,10 +1580,6 @@ msgstr "चयनित टैब की सक्रिय पैनल सा
msgid "Activity"
msgstr "गतिविधि"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "बिना पूछे काम करता है"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/id/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5173,7 +5173,6 @@
"uoJF_D": ["Terlalu sulit disiapkan atau dimulai"],
"ur2XSb": ["Penyunting visual"],
"uuoHOU": ["Perintah gagal."],
"uv4Owp": ["Bertindak tanpa bertanya"],
"uwzRx4": [
"Sesuaikan ukuran dan batas waktu permintaan pengindeksan untuk server embedding yang lambat atau terbatas memori. Sebagian besar penyiapan sebaiknya mempertahankan nilai bawaan."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/id/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,10 +1580,6 @@ msgstr "Isi panel aktif untuk tab yang dipilih muncul di sini."
msgid "Activity"
msgstr "Aktivitas"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "Bertindak tanpa bertanya"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/ko/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4940,7 +4940,6 @@
"uoJF_D": ["설정하거나 시작하기가 너무 어려웠습니다"],
"ur2XSb": ["비주얼 편집기"],
"uuoHOU": ["명령에 실패했습니다."],
"uv4Owp": ["묻지 않고 실행"],
"uwzRx4": [
"느리거나 메모리가 제한된 임베딩 서버에 맞게 인덱싱 요청 크기와 시간 제한을 조정합니다. 대부분의 환경에서는 기본값을 유지하는 것이 좋습니다."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "선택한 탭의 활성 패널 콘텐츠가 여기에 표시됩니다."
msgid "Activity"
msgstr "활동"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "묻지 않고 실행"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/pseudo/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5156,7 +5156,6 @@
"uoJF_D": ["Ĩţ ŵàś ţōō ĥàŕď ţō śēţ ũƥ ōŕ ĝēţ śţàŕţēď"],
"ur2XSb": ["Vĩśũàĺ ēďĩţōŕ"],
"uuoHOU": ["Ćōḿḿàńď ƒàĩĺēď."],
"uv4Owp": ["Àćţś ŵĩţĥōũţ àśķĩńĝ"],
"uwzRx4": [
"ÀďĴũśţ ĩńďēxĩńĝ ŕēǫũēśţ śĩźē àńď ţĩḿēōũţ ƒōŕ śĺōŵ ōŕ ḿēḿōŕŷ-ćōńśţŕàĩńēď ēḿƀēďďĩńĝ śēŕvēŕś. Ḿōśţ śēţũƥś śĥōũĺď ķēēƥ ţĥē ďēƒàũĺţś."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/pseudo/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,10 +1580,6 @@ msgstr ""
msgid "Activity"
msgstr ""

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr ""

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/pt-BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5824,7 +5824,6 @@
"uoJF_D": ["Foi difícil demais configurar ou começar"],
"ur2XSb": ["Editor visual"],
"uuoHOU": ["O comando falhou."],
"uv4Owp": ["Age sem perguntar"],
"uwzRx4": [
"Ajuste o tamanho e o tempo limite das requisições de indexação para servidores de embeddings lentos ou com pouca memória. A maioria das configurações deve manter os valores padrão."
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/pt-BR/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,10 +1580,6 @@ msgstr "O conteúdo do painel ativo da aba selecionada aparece aqui."
msgid "Activity"
msgstr "Atividade"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "Age sem perguntar"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/ur/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5238,7 +5238,6 @@
"uoJF_D": ["اسے ترتیب دینا یا شروع کرنا بہت مشکل تھا"],
"ur2XSb": ["بصری ایڈیٹر"],
"uuoHOU": ["کمانڈ ناکام ہو گئی۔"],
"uv4Owp": ["پوچھے بغیر کام کرتا ہے"],
"uwzRx4": [
"سست یا محدود میموری والے ایمبیڈنگ سرورز کے لیے انڈیکسنگ درخواست کا حجم اور ٹائم آؤٹ ایڈجسٹ کریں۔ زیادہ تر سیٹ اپ میں طے شدہ اقدار ہی رکھنی چاہییں۔"
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/ur/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "منتخب ٹیب کے فعال پینل کا مواد یہاں دکھا
msgid "Activity"
msgstr "سرگرمی"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "پوچھے بغیر کام کرتا ہے"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/zh-Hans/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4470,7 +4470,6 @@
"uoJF_D": ["设置或上手太麻烦了"],
"ur2XSb": ["可视化编辑器"],
"uuoHOU": ["命令执行失败。"],
"uv4Owp": ["无需确认即可操作"],
"uwzRx4": [
"为速度较慢或内存受限的嵌入服务器调整索引请求的大小和超时时间。大多数情况下应保持默认值。"
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/zh-Hans/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "所选标签页的活动面板内容显示在这里。"
msgid "Activity"
msgstr "动态"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "无需确认即可操作"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/locales/zh-Hant/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4492,7 +4492,6 @@
"uoJF_D": ["設定或上手太麻煩了"],
"ur2XSb": ["視覺化編輯器"],
"uuoHOU": ["指令執行失敗。"],
"uv4Owp": ["無需確認即可操作"],
"uwzRx4": [
"為速度較慢或記憶體受限的嵌入伺服器調整索引請求的大小與逾時時間。大多數情況下應保持預設值。"
],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locales/zh-Hant/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1584,10 +1584,6 @@ msgstr "所選分頁的作用中面板內容會顯示在這裡。"
msgid "Activity"
msgstr "動態"

#: src/components/acp/ThreadView.tsx
msgid "Acts without asking"
msgstr "無需確認即可操作"

#: src/components/AppMenubar.tsx
#: src/lib/native-menu-catalog.ts
msgid "Actual Size"
Expand Down