diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4812689..263a091 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.3.0] - 2026-06-12
+
+### Added
+
+- 💬 **Messaging bots.** Connect your AI to Telegram, Discord, Slack, WhatsApp, and Signal from Settings. Each bot has full tool access, streams responses in real time, and syncs conversations back to the web UI. Use `/workspace` to switch projects and `/new` to start fresh conversations.
+- 📊 **Usage tooltip.** Hover the info icon on completed messages to see token counts and timing.
+
+### Changed
+
+- 🔄 **Live tool progress.** See what tools are running as they execute, not just after they finish.
+- 🌍 **i18n updates.** Full translation coverage across all 10 locales.
+
+### Fixed
+
+- 🐛 **Empty model selector.** Shows a helpful label when no models are configured.
+
## [0.2.3] - 2026-06-12
### Added
diff --git a/cptr/app.py b/cptr/app.py
index 4022736..4898808 100644
--- a/cptr/app.py
+++ b/cptr/app.py
@@ -9,6 +9,8 @@ from cptr.routers import (
admin_router,
auth_router,
automations_router,
+ bridge_router,
+ webhook_router,
chat_router,
events_router,
files_router,
@@ -55,6 +57,19 @@ async def startup():
asyncio.create_task(scheduler_worker_loop(app))
+ # Start messaging bots
+ from cptr.utils.bridge import BotManager
+
+ app.state.bot_manager = BotManager()
+ asyncio.create_task(app.state.bot_manager.start_all())
+
+
+@app.on_event("shutdown")
+async def shutdown():
+ bot_manager = getattr(app.state, "bot_manager", None)
+ if bot_manager:
+ await bot_manager.stop_all()
+
# Auth middleware
@app.middleware("http")
@@ -187,6 +202,8 @@ async def get_config():
app.include_router(admin_router)
app.include_router(auth_router)
app.include_router(automations_router)
+app.include_router(bridge_router)
+app.include_router(webhook_router)
app.include_router(chat_router)
app.include_router(events_router)
app.include_router(files_router)
diff --git a/cptr/frontend/package.json b/cptr/frontend/package.json
index 21348c9..d0a632e 100644
--- a/cptr/frontend/package.json
+++ b/cptr/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
- "version": "0.2.3",
+ "version": "0.3.0",
"type": "module",
"scripts": {
"dev": "vite dev",
diff --git a/cptr/frontend/src/app.css b/cptr/frontend/src/app.css
index 31bdf3e..64a0846 100644
--- a/cptr/frontend/src/app.css
+++ b/cptr/frontend/src/app.css
@@ -2,6 +2,7 @@
@plugin "@tailwindcss/typography";
@custom-variant dark (&:where(.dark, .dark *));
+@custom-variant hover (&:hover);
@theme {
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
diff --git a/cptr/frontend/src/lib/apis/bots.ts b/cptr/frontend/src/lib/apis/bots.ts
new file mode 100644
index 0000000..e214aff
--- /dev/null
+++ b/cptr/frontend/src/lib/apis/bots.ts
@@ -0,0 +1,70 @@
+import { fetchJSON, jsonBody } from './index';
+
+export type BotData = {
+ id: string;
+ platform: string;
+ name: string;
+ workspace: string;
+ model_id: string;
+ token_masked: string;
+ allowed_senders: string[];
+ is_active: boolean;
+ is_running: boolean;
+ meta: Record | null;
+ created_at: number;
+ updated_at: number;
+};
+
+export type BotForm = {
+ platform: string;
+ name: string;
+ workspace: string;
+ model_id: string;
+ token: string;
+ allowed_senders?: string[];
+ is_active?: boolean;
+};
+
+export type BotUpdate = {
+ name?: string;
+ workspace?: string;
+ model_id?: string;
+ token?: string;
+ allowed_senders?: string[];
+ is_active?: boolean;
+};
+
+export async function listBots(): Promise {
+ return fetchJSON('/api/admin/bots');
+}
+
+export async function createBot(form: BotForm): Promise {
+ return fetchJSON('/api/admin/bots', jsonBody(form));
+}
+
+export async function updateBot(id: string, form: BotUpdate): Promise {
+ return fetchJSON(`/api/admin/bots/${id}`, {
+ method: 'PUT',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify(form)
+ });
+}
+
+export async function deleteBot(id: string): Promise<{ ok: boolean }> {
+ return fetchJSON(`/api/admin/bots/${id}`, { method: 'DELETE' });
+}
+
+export async function startBot(id: string): Promise<{ ok: boolean; is_running: boolean }> {
+ return fetchJSON(`/api/admin/bots/${id}/start`, { method: 'POST' });
+}
+
+export async function stopBot(id: string): Promise<{ ok: boolean; is_running: boolean }> {
+ return fetchJSON(`/api/admin/bots/${id}/stop`, { method: 'POST' });
+}
+
+export async function verifyBotToken(
+ platform: string,
+ token: string
+): Promise<{ ok: boolean; info?: { username: string; id: string }; error?: string }> {
+ return fetchJSON('/api/admin/bots/verify', jsonBody({ platform, token }));
+}
diff --git a/cptr/frontend/src/lib/components/Admin/Connections.svelte b/cptr/frontend/src/lib/components/Admin/Connections.svelte
index dbd4a32..566cc31 100644
--- a/cptr/frontend/src/lib/components/Admin/Connections.svelte
+++ b/cptr/frontend/src/lib/components/Admin/Connections.svelte
@@ -48,7 +48,7 @@
// Revert
conn.enabled = !newVal;
connections = [...connections];
- toast.error('Failed to update connection');
+ toast.error($t('connections.failedToUpdate'));
}
}
diff --git a/cptr/frontend/src/lib/components/Admin/CreateBotModal.svelte b/cptr/frontend/src/lib/components/Admin/CreateBotModal.svelte
new file mode 100644
index 0000000..31d8dbf
--- /dev/null
+++ b/cptr/frontend/src/lib/components/Admin/CreateBotModal.svelte
@@ -0,0 +1,268 @@
+
+
+
+
+ {
+ if (e.key === 'Enter' && name.trim() && (bot || token.trim())) handleSubmit();
+ }}
+ >
+
+ {bot ? 'Edit Bot' : 'Add Bot'}
+
+
+ {#if !bot}
+
+
+
+
+
+
+
+
+
+
+
+ {:else}
+
+
+
+ {/if}
+
+
+
+
+
+ {#if !bot}
+
+ {/if}
+
+
+ {#if verifyResult}
+
+ {#if verifyResult.ok}
+ ✓ {verifyResult.info?.username ? `@${verifyResult.info.username}` : `ID: ${verifyResult.info?.id}`}
+ {:else}
+ ✗ {verifyResult.error}
+ {/if}
+
+ {/if}
+
+
+
+
Comma-separated user IDs. Leave empty to allow all.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{#if showWsMenu && wsBtnEl}
+ (showWsMenu = false)}
+ preferAbove={true}
+ maxHeight="15rem"
+ className="w-48"
+ />
+{/if}
diff --git a/cptr/frontend/src/lib/components/Admin/Messaging.svelte b/cptr/frontend/src/lib/components/Admin/Messaging.svelte
new file mode 100644
index 0000000..67ef7a5
--- /dev/null
+++ b/cptr/frontend/src/lib/components/Admin/Messaging.svelte
@@ -0,0 +1,149 @@
+
+
+
+
{$t('admin.messaging')}
+
+
+
+{#if loading}
+
+
+
+{:else}
+
+ {#each bots as bot}
+
+
+
+
+
+
+
+
+ (editBot = bot)}
+ onkeydown={() => {}}
+ >
+ {bot.name}
+
+
+
+
+
+
+
+ toggleRunning(e, bot)}
+ onkeydown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ toggleRunning(e, bot);
+ }
+ }}
+ >
+
+
+
+ {/each}
+
+ {#if bots.length === 0}
+
No messaging bots configured.
+ {/if}
+
+{/if}
+
+{#if showCreate}
+ (showCreate = false)} onsave={handleSaved} />
+{/if}
+
+{#if editBot}
+ (editBot = null)}
+ onsave={handleSaved}
+ />
+{/if}
diff --git a/cptr/frontend/src/lib/components/ChangelogModal.svelte b/cptr/frontend/src/lib/components/ChangelogModal.svelte
index 72012ef..26475ea 100644
--- a/cptr/frontend/src/lib/components/ChangelogModal.svelte
+++ b/cptr/frontend/src/lib/components/ChangelogModal.svelte
@@ -4,6 +4,7 @@
import Icon from './Icon.svelte';
import { appVersion, lastSeenVersion, showChangelog } from '$lib/stores';
import Spinner from '$lib/components/common/Spinner.svelte';
+ import { t } from '$lib/i18n';
type ChangelogEntry = { title: string; content: string; raw: string };
type VersionData = { date: string; [section: string]: string | ChangelogEntry[] };
@@ -61,10 +62,10 @@
-
What's New
+
{$t('changelog.whatsNew')}
{#if $appVersion}
- Release Notes
+ {$t('changelog.releaseNotes')}
{/if}
@@ -138,18 +139,18 @@
{:else if error}
-
Couldn't load release notes.
+
{$t('changelog.loadError')}
{:else}
- Loading release notes...
+ {$t('changelog.loading')}
{/if}
@@ -159,7 +160,7 @@
class="text-[13px] text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors duration-100"
onclick={handleClose}
>
- Done
+ {$t('changelog.done')}
diff --git a/cptr/frontend/src/lib/components/Icon.svelte b/cptr/frontend/src/lib/components/Icon.svelte
index f240976..fd661f1 100644
--- a/cptr/frontend/src/lib/components/Icon.svelte
+++ b/cptr/frontend/src/lib/components/Icon.svelte
@@ -314,5 +314,24 @@
+ {:else if name === 'telegram'}
+
+ {:else if name === 'discord'}
+
+
+
+
+
+ {:else if name === 'slack'}
+
+
+
+
+ {:else if name === 'whatsapp'}
+
+
+ {:else if name === 'signal'}
+
+
{/if}
diff --git a/cptr/frontend/src/lib/components/Settings/About.svelte b/cptr/frontend/src/lib/components/Settings/About.svelte
index cb9de7a..4176fd3 100644
--- a/cptr/frontend/src/lib/components/Settings/About.svelte
+++ b/cptr/frontend/src/lib/components/Settings/About.svelte
@@ -29,7 +29,7 @@
target="_blank"
rel="noopener noreferrer"
class="text-[11px] text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 transition-colors"
- >v{$latestVersion} available{$t('about.updateAvailable', { version: $latestVersion })}
{/if}
@@ -44,11 +44,11 @@
href="https://github.com/open-webui/computer/blob/main/LICENSE"
target="_blank"
rel="noopener noreferrer"
- class="underline hover:text-gray-700 dark:hover:text-gray-300">Open Use License{$t('about.licenseName')}
- Copyright © 2026 Open WebUI Inc. All rights reserved.
+ {$t('about.copyright')}
diff --git a/cptr/frontend/src/lib/components/Settings/General.svelte b/cptr/frontend/src/lib/components/Settings/General.svelte
index e07e324..9c9d3eb 100644
--- a/cptr/frontend/src/lib/components/Settings/General.svelte
+++ b/cptr/frontend/src/lib/components/Settings/General.svelte
@@ -32,9 +32,9 @@
method: 'PUT',
body: JSON.stringify({ config: { 'notifications.webhook_url': webhookUrl.trim() || null } })
});
- toast.success('Webhook URL saved');
+ toast.success($t('general.webhookUrlSaved'));
} catch {
- toast.error('Failed to save webhook URL');
+ toast.error($t('general.webhookUrlSaveFailed'));
} finally {
webhookLoading = false;
}
@@ -48,7 +48,7 @@
if (permission === 'granted') {
notificationsEnabled.set(true);
} else {
- toast.error('Browser notification permission denied');
+ toast.error($t('general.notificationPermissionDenied'));
}
}
} else {
@@ -88,28 +88,28 @@
- Notifications
+ {$t('general.notifications')}
- Show OS-level notifications when a task completes and the tab is not focused.
+ {$t('general.browserNotificationsDesc')}
{#if $session?.role === 'admin'}
- Updates
+ {$t('general.updates')}
- Show a toast when a new version of cptr is available.
+ {$t('general.updateNotificationsDesc')}
{/if}
- Message queue
+ {$t('general.messageQueue')}
- {#each [{ value: 'queue' as StreamingBehavior, label: 'Queue' }, { value: 'interrupt' as StreamingBehavior, label: 'Interrupt' }] as opt}
+ {#each [{ value: 'queue' as StreamingBehavior, label: $t('general.queue') }, { value: 'interrupt' as StreamingBehavior, label: $t('general.interrupt') }] as opt}
diff --git a/cptr/frontend/src/lib/components/automations/AutomationsPanel.svelte b/cptr/frontend/src/lib/components/automations/AutomationsPanel.svelte
index b6af222..f8391fa 100644
--- a/cptr/frontend/src/lib/components/automations/AutomationsPanel.svelte
+++ b/cptr/frontend/src/lib/components/automations/AutomationsPanel.svelte
@@ -22,6 +22,7 @@
type AutomationRunData
} from '$lib/apis/automations';
import { toast } from 'svelte-sonner';
+ import { t } from '$lib/i18n';
interface Props {
automationId?: string;
@@ -50,7 +51,7 @@
items = res.items;
total = res.total;
} catch (e: any) {
- toast.error(e.message || 'Failed to load automations');
+ toast.error(e.message || $t('automations.failedToLoad'));
} finally {
loading = false;
}
@@ -62,7 +63,7 @@
detail = await getAutomationById(id);
runs = await getAutomationRuns(id);
} catch (e: any) {
- toast.error(e.message || 'Failed to load automation');
+ toast.error(e.message || $t('automations.failedToLoadOne'));
} finally {
detailLoading = false;
}
@@ -86,28 +87,28 @@
items = items.map((i) => (i.id === a.id ? updated : i));
if (detail?.id === a.id) detail = updated;
} catch (e: any) {
- toast.error(e.message || 'Failed to toggle');
+ toast.error(e.message || $t('automations.failedToToggle'));
}
}
async function handleDelete(a: AutomationData) {
- if (!confirm(`Delete "${a.name}"?`)) return;
+ if (!confirm($t('automations.deleteConfirm', { name: a.name }))) return;
try {
await deleteAutomation(a.id);
items = items.filter((i) => i.id !== a.id);
if (detail?.id === a.id) goto('/automations');
- toast.success('Deleted');
+ toast.success($t('automations.deleted'));
} catch (e: any) {
- toast.error(e.message || 'Failed to delete');
+ toast.error(e.message || $t('automations.failedToDelete'));
}
}
async function handleRunNow(a: AutomationData) {
try {
await runAutomation(a.id);
- toast.success(`"${a.name}" triggered`);
+ toast.success($t('automations.triggered', { name: a.name }));
} catch (e: any) {
- toast.error(e.message || 'Failed to run');
+ toast.error(e.message || $t('automations.failedToRun'));
}
}
@@ -153,9 +154,9 @@
const updated = await generateWebhook(detail.id);
detail = updated;
items = items.map((i) => (i.id === updated.id ? updated : i));
- toast.success('Webhook enabled');
+ toast.success($t('automations.webhookEnabled'));
} catch (e: any) {
- toast.error(e.message || 'Failed to generate webhook');
+ toast.error(e.message || $t('automations.failedToGenerateWebhook'));
} finally {
webhookLoading = false;
}
@@ -168,9 +169,9 @@
const updated = await deleteWebhook(detail.id);
detail = updated;
items = items.map((i) => (i.id === updated.id ? updated : i));
- toast.success('Webhook disabled');
+ toast.success($t('automations.webhookDisabled'));
} catch (e: any) {
- toast.error(e.message || 'Failed to revoke webhook');
+ toast.error(e.message || $t('automations.failedToRevokeWebhook'));
} finally {
webhookLoading = false;
}
@@ -198,7 +199,7 @@
sidebarOpen.set(true)}
- title="Toggle sidebar"
+ title={$t('automations.toggleSidebar')}
>
@@ -208,7 +209,7 @@
onclick={() => goto('/automations')}
>
- Automations
+ {$t('automations.title')}
/
{detail.name}
@@ -218,21 +219,21 @@
handleRunNow(detail!)}
- title="Run now"
+ title={$t('automations.runNow')}
>
{ editingAutomation = detail; showModal = true; }}
- title="Edit"
+ title={$t('automationModal.save')}
>
handleDelete(detail!)}
- title="Delete"
+ title={$t('admin.delete')}
>
@@ -244,30 +245,30 @@
-
Status
+
{$t('automations.status')}
- {detail.is_active ? 'Active' : 'Paused'}
+ {detail.is_active ? $t('automations.active') : $t('automations.paused')}
- Schedule
+ {$t('automations.schedule')}
{parseFrequency(detail.rrule)}
- Model
+ {$t('automations.model')}
{detail.model_id}
- Next run
+ {$t('automations.nextRun')}
{formatTime(detail.next_run_at)}
- Last run
+ {$t('automations.lastRun')}
{formatTime(detail.last_run_at)}
-
Webhook
+
{$t('automations.webhook')}
{#if detail.webhook_url}
...?token={detail.webhook_url.split('token=')[1]?.slice(0, 12)}...
@@ -275,20 +276,20 @@
class="text-[11px] text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors duration-75 shrink-0"
onclick={copyWebhookUrl}
>
- {webhookCopied ? 'Copied!' : 'Copy'}
+ {webhookCopied ? $t('automations.copied') : $t('automations.copy')}
{:else if detail.has_webhook}
- Enabled
+ {$t('automations.enabled')}
·
- Regenerate
+ {$t('automations.regenerate')}
·
- Disable
+ {$t('automations.disable')}
{:else}
@@ -305,7 +306,7 @@
onclick={handleGenerateWebhook}
disabled={webhookLoading}
>
- Enable
+ {$t('automations.enable')}
{/if}
@@ -313,7 +314,7 @@
-
Prompt
+
{$t('automations.prompt')}
{detail.prompt}
@@ -321,9 +322,9 @@
-
Runs
+
{$t('automations.runs')}
{#if runs.length === 0}
-
No runs yet
+
{$t('automations.noRuns')}
{:else}
{#each runs as run}
@@ -340,7 +341,7 @@
setTimeout(() => openChatTab(run.chat_id!), 300);
}}
>
- view chat →
+ {$t('automations.viewChat')}
{/if}
{#if run.error}
@@ -360,12 +361,12 @@
sidebarOpen.set(true)}
- title="Toggle sidebar"
+ title={$t('automations.toggleSidebar')}
>
{/if}
-
Automations
+
{$t('automations.title')}
{#if total > 0}
{total}
{/if}
@@ -376,14 +377,14 @@
bind:value={statusFilter}
onchange={loadList}
>
-
-
-
+
+
+
{ editingAutomation = null; showModal = true; }}
- title="New automation"
+ title={$t('automations.newAutomation')}
>
@@ -396,7 +397,7 @@
@@ -416,14 +417,14 @@
{:else if items.length === 0}
- {searchQuery ? 'No matches' : 'No automations yet'}
+ {searchQuery ? $t('automations.noMatches') : $t('automations.noAutomations')}
{#if !searchQuery}
{ editingAutomation = null; showModal = true; }}
>
- Create automation
+ {$t('automations.create')}
{/if}
@@ -448,7 +449,7 @@
handleRunNow(a)}
- title="Run now"
+ title={$t('automations.runNow')}
>
diff --git a/cptr/frontend/src/lib/components/chat/AssistantMessage.svelte b/cptr/frontend/src/lib/components/chat/AssistantMessage.svelte
index fa9576a..298a846 100644
--- a/cptr/frontend/src/lib/components/chat/AssistantMessage.svelte
+++ b/cptr/frontend/src/lib/components/chat/AssistantMessage.svelte
@@ -11,6 +11,7 @@
content: string;
done: boolean;
output: any[] | null;
+ usage: Record
| null;
chatId: string | null;
messageId: string;
siblingIndex?: number;
@@ -24,6 +25,7 @@
content,
done,
output,
+ usage,
chatId,
messageId,
siblingIndex = 0,
@@ -38,6 +40,7 @@
let editedContent = $state('');
let editedOutput = $state(null);
let copied = $state(false);
+ let showUsageTooltip = $state(false);
let textareaEl: HTMLTextAreaElement;
// Track which tool call outputs are expanded
@@ -279,6 +282,23 @@
function groupHasRejected(calls: any[]): boolean {
return calls.some((c: any) => c.status === 'rejected');
}
+
+ /** Format usage data for tooltip display */
+ function formatUsageLabel(key: string): string {
+ return key.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase());
+ }
+
+ function formatUsageValue(key: string, value: number): string {
+ if (key.includes('time') || key.includes('duration') || key.includes('latency')) {
+ if (value >= 1000) return `${(value / 1000).toFixed(2)}s`;
+ return `${value.toFixed(0)}ms`;
+ }
+ if (key.includes('token') || key.includes('count')) {
+ return value.toLocaleString();
+ }
+ if (Number.isInteger(value)) return value.toLocaleString();
+ return value.toFixed(2);
+ }
@@ -360,8 +380,19 @@
}}
>
-