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
14 changes: 8 additions & 6 deletions docs/de/platform/chat/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ Wächst das Gespräch über das Kontextfenster des Modells hinaus, fallen die ä

Der Assistent trägt genau drei Tools, alle drei reiner Lese-Abruf — das ist die Grenze, die Chat ein Gespräch bleiben lässt statt einer Werkbank.

| Tool | Was es erreicht |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rag_search` | Das Wissen der Organisation und ihre Arbeit: Dokumente, Wissenseinträge, gecrawlte Website-Seiten, Produkte, Kontakte, Aufgaben und Projekte |
| `rag_fetch` | Das Detail hinter einer Referenz — ein Dokument über seine Datei-ID, eine gecrawlte Seite über ihre URL, eine Aufgabe über die Referenz aus einer Suche |
| `web_fetch` | Eine öffentliche Webseite, live geholt — der Schritt über das Org-Wissen hinaus; bereits gecrawlte Inhalte liefert `rag_fetch` |
| Tool | Was es erreicht |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `rag_search` | Das Wissen der Organisation und ihre Arbeit: Dokumente, Wissenseinträge, gecrawlte Website-Seiten, Produkte, Kontakte, Websites, Aufgaben und Projekte — und die Konversationen des Posteingangs |
| `rag_fetch` | Das Detail hinter einer Referenz — ein Dokument über seine Datei-ID, eine gecrawlte Seite über ihre URL, eine Aufgabe über die Referenz aus einer Suche |
| `web_fetch` | Eine öffentliche Webseite, live geholt — der Schritt über das Org-Wissen hinaus; bereits gecrawlte Inhalte liefert `rag_fetch` |

Nach dem Board zu fragen — etwa was in einem Projekt offen ist — ist eine Suche, kein separates Feature. Dieselbe `rag_search` liest die Aufgaben und Projekte, die du sehen darfst, auf deinen eigenen Zugriff gefiltert, und der Assistent antwortet daraus, statt einen externen Tracker vorzuschlagen. Ein Aufgaben-Treffer bringt Titel, Status und Projekt mit; `rag_fetch` auf seine Referenz ergänzt die vollständige Beschreibung, Kommentare, Teilaufgaben und Blocker.

Durchblättern ist dasselbe Tool mit seinem zweiten Verb. „Liste die Aufgaben in Review" oder „zeig unsere Kontakte" lässt `rag_search` explizit auflisten statt Text zu matchen: eine Art pro Aufruf, das aktuelle Board ohne archivierte Zeilen, höchstens zwanzig Zeilen pro Seite. Der Assistent erfährt, wenn eine Seite nicht die ganze Menge ist — er holt dann die nächste Seite oder sagt, welchen Ausschnitt er gesehen hat, statt zwanzig Zeilen als alles auszugeben.

Eine Suche ist ehrlich darüber, was sie abgedeckt hat: Das Ergebnis benennt jede durchsuchte Quelle und sagt, welche nicht verfügbar waren — eine Organisation ohne konfiguriertes Embedding-Modell bekommt zum Beispiel „Dokumente und gecrawlte Seiten sind noch nicht durchsuchbar" statt einer stumm leeren Liste, und der Assistent gibt das weiter, statt darum herumzuraten.

Mehr gibt es bewusst nicht — kein Code-Ausführen, kein Datei-Schreiben, keine Connectors, keine Sub-Agents. Diese Fähigkeiten leben auf Aufgaben und in Automatisierungen, wo es Verantwortliche, einen Prüfschritt und ein Audit-Protokoll gibt, das ihnen gewachsen ist.
Expand All @@ -78,7 +80,7 @@ Bitte den Assistenten um eine Präsentation, ein übersetztes Dokument oder ein
Die Antwort streamt herein, während sie entsteht. Darüber hält der Denkverlauf fest, was der Assistent getan hat, in Reihenfolge:

- Eine einklappbare Zeile **„Hat _n_ s nachgedacht"** trägt das Nachdenken des Modells — ein Klick klappt die Prosa auf.
- Jeder Tool-Aufruf ist eine Schrittzeile — _Durchsucht die Wissensdatenbank nach "…"_, _Liest example.com_ — mit einem Spinner, solange er läuft, und einer Warnung samt Grund, wenn er scheitert. Die Schritte bleiben sichtbar, wenn das Nachdenken eingeklappt ist; sie sind das Protokoll dessen, wonach der Assistent gegriffen hat.
- Jeder Tool-Aufruf ist eine Schrittzeile — _Durchsucht den Workspace nach "…"_, _Listet Aufgaben auf_, _Liest example.com_ — mit einem Spinner, solange er läuft, und einer Warnung samt Grund, wenn er scheitert. Die Schritte bleiben sichtbar, wenn das Nachdenken eingeklappt ist; sie sind das Protokoll dessen, wonach der Assistent gegriffen hat.

Unter der Antwort listet **Quellen** die Seiten und Dokumente, die der Assistent tatsächlich geladen hat — abgeleitet aus den Tool-Ergebnissen, nicht aus der Prosa, sodass eine Quellenkarte nie eine Lektüre behauptet, die nicht stattgefunden hat. Web-Quellen öffnen in einem neuen Tab.

Expand Down
14 changes: 8 additions & 6 deletions docs/en/platform/chat/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ When the conversation outgrows the model's context window, the oldest messages a

The assistant carries exactly three tools, all read-only retrieval — this is the boundary that keeps chat a conversation rather than a workbench.

| Tool | What it reaches |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `rag_search` | The organisation's knowledge and its work: documents, knowledge entries, crawled website pages, products, contacts, tasks, and projects |
| `rag_fetch` | The full detail behind a ref — a document by its file id, a crawled page by its URL, or a task by the ref a search returned |
| `web_fetch` | A public web page, fetched live — the step beyond the organisation's knowledge; content already crawled is served by `rag_fetch` |
| Tool | What it reaches |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rag_search` | The organisation's knowledge and its work: documents, knowledge entries, crawled website pages, products, contacts, websites, tasks and projects, and the inbox's conversations |
| `rag_fetch` | The full detail behind a ref — a document by its file id, a crawled page by its URL, or a task by the ref a search returned |
| `web_fetch` | A public web page, fetched live — the step beyond the organisation's knowledge; content already crawled is served by `rag_fetch` |

Asking about the board is a search, not a different feature. "What's open on the launch project?" reaches the same `rag_search` — it reads the tasks and projects you can see, filtered to your own access, and the assistant answers from them instead of suggesting an external tracker. A task result carries its title, status and project; `rag_fetch` on its ref adds the full description, comments, subtasks and blockers.

Browsing is the same tool with its second verb. "List the tasks in review" or "show our contacts" runs `rag_search` as an explicit listing rather than a text match: one kind per call, the current board without archived rows, and a page of at most twenty at a time. The assistant is told when a page is not the whole set, so it fetches the next page or says which part it saw — it never presents twenty rows as everything.

A search is honest about what it covered: the result names every source it searched and says which were unavailable — an organisation without an embedding model configured, for example, gets "documents and crawled pages can't be searched yet" rather than a silent empty list, and the assistant relays that instead of guessing around it.

There is deliberately nothing else — no code execution, no file writing, no connectors, no sub-agents. Those capabilities live on tasks and inside automations, where there is an owner, a review step, and an audit trail sized for them.
Expand All @@ -78,7 +80,7 @@ Ask the assistant for a presentation, a translated document, or any other artifa
The reply streams in as it is generated. Above it, the thought timeline records what the assistant did, in order:

- A collapsible **"Thought for _n_ s"** line carries the model's reasoning — click to expand the prose.
- Each tool call is a step row — _Searching knowledge base for "…"_, _Reading example.com_ — with a spinner while it runs and a warning with the reason when it fails. The steps stay visible when the reasoning is collapsed; they are the record of what the assistant reached for.
- Each tool call is a step row — _Searching the workspace for "…"_, _Listing tasks_, _Reading example.com_ — with a spinner while it runs and a warning with the reason when it fails. The steps stay visible when the reasoning is collapsed; they are the record of what the assistant reached for.

Below the answer, **Sources** lists the pages and documents the assistant actually loaded — derived from the tool results, not from the prose, so a source card never claims reading that did not happen. Web sources open in a new tab.

Expand Down
14 changes: 8 additions & 6 deletions docs/fr/platform/chat/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ Quand la conversation dépasse la fenêtre de contexte du modèle, les messages

L’assistant porte exactement trois outils, tous tournés vers la récupération et tous en lecture seule — c’est la frontière qui fait du chat une conversation plutôt qu’un établi.

| Outil | Ce qu’il atteint |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rag_search` | Les connaissances de l’organisation et son travail : documents, entrées de connaissances, pages de sites web explorés, produits, contacts, tâches et projets |
| `rag_fetch` | Le détail derrière une référence — un document par son identifiant de fichier, une page explorée par son URL, une tâche par la référence issue d’une recherche |
| `web_fetch` | Une page web publique, récupérée en direct — l’étape au-delà des connaissances de l’organisation ; le contenu déjà exploré passe par `rag_fetch` |
| Outil | Ce qu’il atteint |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rag_search` | Les connaissances de l’organisation et son travail : documents, entrées de connaissances, pages de sites web explorés, produits, contacts, sites web, tâches et projets — et les conversations de la boîte de réception |
| `rag_fetch` | Le détail derrière une référence — un document par son identifiant de fichier, une page explorée par son URL, une tâche par la référence issue d’une recherche |
| `web_fetch` | Une page web publique, récupérée en direct — l’étape au-delà des connaissances de l’organisation ; le contenu déjà exploré passe par `rag_fetch` |

Interroger le tableau — ce qui est ouvert sur un projet, par exemple — relève de la recherche, pas d’une autre fonctionnalité. La même `rag_search` lit les tâches et les projets que tu peux voir, filtrés selon ton propre accès, et l’assistant répond à partir de là plutôt que de proposer un outil externe. Un résultat de tâche porte son titre, son statut et son projet ; `rag_fetch` sur sa référence ajoute la description complète, les commentaires, les sous-tâches et les bloqueurs.

Parcourir, c’est le même outil avec son second verbe. « Liste les tâches en revue » ou « montre nos contacts » fait tourner `rag_search` en listage explicite plutôt qu’en correspondance de texte : une seule sorte par appel, le tableau courant sans les lignes archivées, au plus vingt lignes par page. L’assistant sait quand une page n’est pas l’ensemble complet — il va chercher la page suivante ou dit quelle partie il a vue, au lieu de présenter vingt lignes comme le tout.

Une recherche est honnête sur ce qu’elle a couvert : le résultat nomme chaque source interrogée et dit lesquelles étaient indisponibles — une organisation sans modèle d’embedding configuré reçoit par exemple « les documents et les pages explorées ne peuvent pas encore être cherchés » plutôt qu’une liste vide et muette, et l’assistant relaie ce constat au lieu de deviner autour.

Il n’y a délibérément rien d’autre — pas d’exécution de code, pas d’écriture de fichiers, pas de connectors, pas de sous-agents. Ces capacités vivent sur les tâches et dans les automatisations, là où existent un responsable, une étape de relecture et une piste d’audit à leur mesure.
Expand All @@ -78,7 +80,7 @@ Demande à l’assistant une présentation, un document traduit ou n’importe q
La réponse arrive en streaming à mesure qu’elle se génère. Au-dessus d’elle, le déroulé de réflexion consigne ce que l’assistant a fait, dans l’ordre :

- Une ligne repliable **« A réfléchi pendant _n_ s »** porte le raisonnement du modèle — clique pour déplier la prose.
- Chaque appel d’outil est une ligne d’étape — _Recherche dans la base de connaissances pour « … »_, _Lecture de example.com_ — avec un indicateur d’activité pendant qu’il tourne et, quand il échoue, un avertissement qui en donne la raison. Les étapes restent visibles quand le raisonnement est replié ; elles sont la trace de ce que l’assistant est allé chercher.
- Chaque appel d’outil est une ligne d’étape — _Recherche de « … » dans l’espace de travail_, _Liste des tâches_, _Lecture de example.com_ — avec un indicateur d’activité pendant qu’il tourne et, quand il échoue, un avertissement qui en donne la raison. Les étapes restent visibles quand le raisonnement est replié ; elles sont la trace de ce que l’assistant est allé chercher.

Sous la réponse, **Sources** liste les pages et les documents que l’assistant a réellement chargés — la liste dérive des résultats d’outils, pas de la prose, si bien qu’une carte de source ne revendique jamais une lecture qui n’a pas eu lieu. Les sources web s’ouvrent dans un nouvel onglet.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ function isImageAttachment(
}

/** What a tool was asked, for the chip's detail: the retrieval tools carry
* exactly one human-meaningful argument each. */
* exactly one human-meaningful argument each — except a list call, whose
* load-bearing facts are its filters. */
function toolCallDetail(input: unknown): string | undefined {
if (!isRecord(input)) return undefined;
if (input.action === 'list') {
const kind = typeof input.kind === 'string' ? input.kind : undefined;
const status = typeof input.status === 'string' ? input.status : undefined;
if (kind === undefined) return undefined;
return status === undefined ? kind : `${kind} · ${status}`;
}
for (const key of ['query', 'ref', 'url'] as const) {
const value = input[key];
if (typeof value === 'string' && value.length > 0) return value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ const TOOL_ICONS: Record<string, ComponentType<{ className?: string }>> = {
};

/** What a tool was asked, for the step's detail: the retrieval tools carry
* exactly one human-meaningful argument each. */
* exactly one human-meaningful argument each — except a list call, whose
* load-bearing facts are its filters. */
function toolCallDetail(input: unknown): string | undefined {
if (!isRecord(input)) return undefined;
if (input.action === 'list') {
const kind = typeof input.kind === 'string' ? input.kind : undefined;
const status = typeof input.status === 'string' ? input.status : undefined;
if (kind === undefined) return undefined;
return status === undefined ? kind : `${kind} · ${status}`;
}
for (const key of ['query', 'ref', 'url'] as const) {
const value = input[key];
if (typeof value === 'string' && value.length > 0) return value;
Expand Down
84 changes: 84 additions & 0 deletions services/platform/app/features/chat/utils/activity-label.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import type { TFunction } from 'i18next';
import { describe, expect, it } from 'vitest';

import { ragSearchListingKind, stepActivityLabel } from './activity-label';

/** A translator that renders the key and its params, so an assertion reads
* the exact call instead of a locale string. */
function fakeT(): TFunction {
const impl = (key: string, params?: Record<string, unknown>) =>
params === undefined ? key : `${key} ${JSON.stringify(params)}`;
return impl as TFunction;
}

describe('stepActivityLabel — rag_search', () => {
const t = fakeT();

it('labels a list call by its kind, never with empty quotes', () => {
const label = stepActivityLabel(t, {
tool: 'rag_search',
input: { action: 'list', kind: 'task', status: 'in_review' },
});
expect(label).toBe('thinking.listing.tasks');
expect(label).not.toContain('""');
});

it('reads a queryless kind-only call as the list the executor runs', () => {
expect(
stepActivityLabel(t, {
tool: 'rag_search',
input: { kind: 'contact' },
}),
).toBe('thinking.listing.contacts');
});

it('falls back to the generic listing label on an unknown kind', () => {
expect(
stepActivityLabel(t, {
tool: 'rag_search',
input: { action: 'list', kind: 'mystery' },
}),
).toBe('thinking.listing.generic');
expect(
stepActivityLabel(t, {
tool: 'rag_search',
input: { action: 'list' },
}),
).toBe('thinking.listing.generic');
});

it('keeps every historical query row rendering as a search', () => {
expect(
stepActivityLabel(t, {
tool: 'rag_search',
detail: 'refunds',
input: { query: 'refunds' },
}),
).toBe('thinking.searchingKnowledgeBase {"query":"refunds"}');
// A row with no input at all (the oldest shape) still renders.
expect(
stepActivityLabel(t, { tool: 'rag_search', detail: 'refunds' }),
).toBe('thinking.searchingKnowledgeBase {"query":"refunds"}');
});

it('a kind-narrowed search stays a search label', () => {
expect(
stepActivityLabel(t, {
tool: 'rag_search',
detail: 'ada',
input: { action: 'search', query: 'ada', kind: 'contact' },
}),
).toBe('thinking.searchingKnowledgeBase {"query":"ada"}');
});
});

describe('ragSearchListingKind', () => {
it('never reads a query-bearing call as a list', () => {
expect(ragSearchListingKind({ query: 'open tasks' })).toBeUndefined();
expect(
ragSearchListingKind({ action: 'search', query: 'x', kind: 'task' }),
).toBeUndefined();
expect(ragSearchListingKind(undefined)).toBeUndefined();
expect(ragSearchListingKind('list')).toBeUndefined();
});
});
Loading
Loading