Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6d8fa02
feat(ui): add cot_display and show_step_details config options
RoyBA Jun 10, 2026
bce8e1d
fix(ui): count steps recursively and fix compact label timing
RoyBA Jun 10, 2026
b3983ed
feat(translations): update Dutch translation for 'usedTools' to 'hulp…
RoyBA Jun 10, 2026
ea07e4e
chore: bump to reset stale bot
RoyBA Jun 30, 2026
0ac90e0
chore: bump to reset stale bot
RoyBA Jul 28, 2026
9c92e61
Merge branch 'main' into feat/compact-cot-display
dokterbob Jul 29, 2026
facaed3
fix(ui): add margin to step and accordion trigger elements for better…
RoyBA Jul 29, 2026
62d4d7a
test(e2e): add compact CoT display E2E tests
RoyBA Jul 29, 2026
c2ad12f
fix(ui): surface nested messages and keep step hierarchy in compact/f…
RoyBA Aug 20, 2026
28cce11
fix(ui): base step expandability on non-message children; tighten E2E…
RoyBA Aug 20, 2026
4e353b5
fix(ui): don't flatten message-only steps in default CoT mode
RoyBA Aug 20, 2026
0d28e73
Merge branch 'main' into feat/compact-cot-display
RoyBA Aug 20, 2026
cec8f27
Merge remote-tracking branch 'upstream/main' into feat/compact-cot-di…
RoyBA Aug 25, 2026
f8e06db
Merge remote-tracking branch 'origin/feat/compact-cot-display' into f…
RoyBA Aug 25, 2026
1d99107
Merge branch 'main' into feat/compact-cot-display
dokterbob Aug 26, 2026
3ad243b
fix(ui): respect step icon/avatar in compact CoT summary
RoyBA Sep 1, 2026
4b15775
chore: bump to reset stale bot
RoyBA Sep 18, 2026
87b737f
fix(cot): keep compact 'Using' label while tools run and fix i18n/deps
RoyBA Sep 27, 2026
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
8 changes: 8 additions & 0 deletions backend/chainlit/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@
# Chain of Thought (CoT) display mode. Can be "hidden", "tool_call" or "full".
cot = "full"

# CoT display layout. "list" shows each step individually, "compact" collapses into one summary line.
# cot_display = "list"

# Whether steps are expandable to show input/output details.
# show_step_details = true

# Specify a CSS file that can be used to customize the user interface.
# The CSS file can be served from the public directory or via an external link.
# custom_css = "/public/test.css"
Expand Down Expand Up @@ -437,6 +443,8 @@ class UISettings(BaseModel):
name: str
description: str = ""
cot: Literal["hidden", "tool_call", "full"] = "full"
cot_display: Literal["list", "compact"] = "list"
show_step_details: bool = True
default_theme: Optional[Literal["light", "dark"]] = "dark"
language: Optional[str] = None
layout: Optional[Literal["default", "wide"]] = "default"
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@
"messages": {
"status": {
"using": "يستخدم",
"used": "مستخدم"
"used": "مستخدم",
"usedSteps": "الخطوات المستخدمة: {{count}}",
"usedTools": "الأدوات المستخدمة: {{count}}"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "ব্যবহার করছে",
"used": "ব্যবহৃত"
"used": "ব্যবহৃত",
"usedSteps": "{{count}}টি ধাপ ব্যবহার করেছে",
"usedTools": "{{count}}টি টুল ব্যবহার করেছে"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@
"messages": {
"status": {
"using": "Bruger",
"used": "Brugte"
"used": "Brugte",
"usedSteps": "Brugte {{count}} trin",
"usedTools": "Brugte {{count}} værktøjer"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "Verwendet",
"used": "Verwendete"
"used": "Verwendete",
"usedSteps": "{{count}} Schritte verwendet",
"usedTools": "{{count}} Tools verwendet"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/el-GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "Με τη χρήση",
"used": "Χρησιμοποιήθηκε"
"used": "Χρησιμοποιήθηκε",
"usedSteps": "Χρησιμοποιήθηκαν {{count}} βήματα",
"usedTools": "Χρησιμοποιήθηκαν {{count}} εργαλεία"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "Using",
"used": "Used"
"used": "Used",
"usedSteps": "Used {{count}} steps",
"usedTools": "Used {{count}} tools"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "Usando",
"used": "Usado"
"used": "Usado",
"usedSteps": "Usó {{count}} pasos",
"usedTools": "Usó {{count}} herramientas"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "Utilise",
"used": "Utilisé"
"used": "Utilisé",
"usedSteps": "{{count}} étapes utilisées",
"usedTools": "{{count}} outils utilisés"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/gu.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "વાપરી રહ્યા છે",
"used": "વપરાયેલ"
"used": "વપરાયેલ",
"usedSteps": "{{count}} પગલાં વાપર્યાં",
"usedTools": "{{count}} ટૂલ્સ વાપર્યાં"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/he-IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "משתמש ב",
"used": "השתמש ב"
"used": "השתמש ב",
"usedSteps": "השתמש ב-{{count}} שלבים",
"usedTools": "השתמש ב-{{count}} כלים"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "उपयोग कर रहे हैं",
"used": "उपयोग किया"
"used": "उपयोग किया",
"usedSteps": "{{count}} चरणों का उपयोग किया",
"usedTools": "{{count}} टूल्स का उपयोग किया"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "In uso",
"used": "Utilizzato"
"used": "Utilizzato",
"usedSteps": "Utilizzati {{count}} passaggi",
"usedTools": "Utilizzati {{count}} strumenti"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@
"messages": {
"status": {
"using": "使用中",
"used": "使用済み"
"used": "使用済み",
"usedSteps": "{{count}}個のステップを使用",
"usedTools": "{{count}}個のツールを使用"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/kn.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "ಬಳಸುತ್ತಿರುವುದು",
"used": "ಬಳಸಲಾಗಿದೆ"
"used": "ಬಳಸಲಾಗಿದೆ",
"usedSteps": "{{count}} ಹಂತಗಳನ್ನು ಬಳಸಲಾಗಿದೆ",
"usedTools": "{{count}} ಸಾಧನಗಳನ್ನು ಬಳಸಲಾಗಿದೆ"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "사용 중",
"used": "사용됨"
"used": "사용됨",
"usedSteps": "{{count}}개의 단계 사용됨",
"usedTools": "{{count}}개의 도구 사용됨"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/ml.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "ഉപയോഗിക്കുന്നു",
"used": "ഉപയോഗിച്ചു"
"used": "ഉപയോഗിച്ചു",
"usedSteps": "{{count}} ഘട്ടങ്ങൾ ഉപയോഗിച്ചു",
"usedTools": "{{count}} ടൂളുകൾ ഉപയോഗിച്ചു"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/mr.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "वापरत आहे",
"used": "वापरले"
"used": "वापरले",
"usedSteps": "{{count}} पायऱ्या वापरल्या",
"usedTools": "{{count}} साधने वापरली"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "In gebruik",
"used": "Gebruikt"
"used": "Gebruikt",
"usedSteps": "{{count}} stappen gebruikt",
"usedTools": "{{count}} hulpmiddelen gebruikt"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "A utilizar",
"used": "Utilizado"
"used": "Utilizado",
"usedSteps": "{{count}} passos utilizados",
"usedTools": "{{count}} ferramentas utilizadas"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/ta.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "பயன்படுத்துகிறது",
"used": "பயன்படுத்தப்பட்டது"
"used": "பயன்படுத்தப்பட்டது",
"usedSteps": "{{count}} படிகள் பயன்படுத்தப்பட்டன",
"usedTools": "{{count}} கருவிகள் பயன்படுத்தப்பட்டன"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/te.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "ఉపయోగిస్తోంది",
"used": "ఉపయోగించబడింది"
"used": "ఉపయోగించబడింది",
"usedSteps": "{{count}} దశలు ఉపయోగించబడ్డాయి",
"usedTools": "{{count}} సాధనాలు ఉపయోగించబడ్డాయి"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "使用中",
"used": "已使用"
"used": "已使用",
"usedSteps": "使用了 {{count}} 个步骤",
"usedTools": "使用了 {{count}} 个工具"
},
"actions": {
"copy": {
Expand Down
4 changes: 3 additions & 1 deletion backend/chainlit/translations/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"messages": {
"status": {
"using": "正在使用",
"used": "已使用"
"used": "已使用",
"usedSteps": "使用了 {{count}} 個步驟",
"usedTools": "使用了 {{count}} 個工具"
},
"actions": {
"copy": {
Expand Down
14 changes: 14 additions & 0 deletions cypress/e2e/compact_steps/.chainlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
allow_origins = ["*"]

[UI]
name = "Assistant"

# Show every step of the chain of thought.
cot = "full"

# Collapse the chain of thought steps into a single compact summary line.
cot_display = "compact"

[meta]
generated_by = "2.11.1"
68 changes: 68 additions & 0 deletions cypress/e2e/compact_steps/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import chainlit as cl


@cl.step(type="tool", name="tool1")
async def tool1():
return "Result from tool1"


@cl.step(type="tool", name="tool2")
async def tool2():
return "Result from tool2"


@cl.step(type="tool", name="tool3")
async def tool3():
return "Result from tool3"


@cl.step(type="tool", name="tool_icon", icon="search")
async def tool_icon():
return "Result from tool_icon"


@cl.step(type="tool", name="agent")
async def agent():
# Two tools nested under an intermediate step. Compact mode must count the
# nested steps recursively (not just top-level ones) to activate.
await tool1()
await tool2()
return "Result from agent"


@cl.step(type="tool", name="answering-agent")
async def answering_agent():
await tool1()
await tool2()
# Assistant message emitted from inside a nested step.
await cl.Message(content="Nested answer").send()


@cl.on_message
async def main(message: cl.Message):
content = message.content.strip().lower()

if content == "single":
# A single visible step must not be collapsed into a compact summary.
await tool1()
elif content == "nested":
# Only one top-level step, but it nests two tools -> 3 visible steps.
await agent()
elif content == "nested_message":
# An assistant message produced inside a nested step must still render
# at the root, not be trapped inside the collapsed compact summary.
await answering_agent()
return
elif content == "icon":
# The last visible step carries an icon, so the compact summary avatar
# must render that icon instead of a fallback avatar image.
await tool1()
await tool2()
await tool_icon()
else:
# Three sequential tools -> collapsed into one compact summary.
await tool1()
await tool2()
await tool3()

await cl.Message(content="Final answer").send()
Loading
Loading