Open source · MIT · Single Go binary
Team chat for humans and their agents.
ClickClack is a self-hostable chat app with Slack-style threads, +import{B as e,D as t,E as n,Et as r,I as i,Ot as a,R as o,S as s,Tt as c,V as l,X as u,a as d,b as f,ct as p,dt as m,f as h,gt as g,ht as _,k as ee,kt as v,pt as y,rt as b,v as x,y as S}from"./3rV_mZVO.js";import"./DrNBvawq.js";var C=new Set([`clickclack.chat`,`www.clickclack.chat`]);function w(e){return C.has(e.toLowerCase())?`https://app.clickclack.chat`:`/app`}var T=e(` `,1),E=e(` `),D=e(`
`),te=e(`
Open source · MIT · Single Go binary
Team chat for humans and their agents.
ClickClack is a self-hostable chat app with Slack-style threads, durable realtime, and an API surface that bots, CI jobs, and agents can drive from a shell.
go run ./apps/api/cmd/clickclack serveWhy ClickClack
Chat infrastructure that stays boring when the socket drops.
Every durable message, thread reply, reaction, and channel update can be
recovered over HTTP with a cursor — clients and agents reconnect without
diff --git a/apps/api/internal/webassets/dist/_app/immutable/chunks/Dqz7aBZi.js b/apps/api/internal/webassets/dist/_app/immutable/chunks/CDauht0z.js
similarity index 99%
rename from apps/api/internal/webassets/dist/_app/immutable/chunks/Dqz7aBZi.js
rename to apps/api/internal/webassets/dist/_app/immutable/chunks/CDauht0z.js
index 6ba2399c1..e382665c0 100644
--- a/apps/api/internal/webassets/dist/_app/immutable/chunks/Dqz7aBZi.js
+++ b/apps/api/internal/webassets/dist/_app/immutable/chunks/CDauht0z.js
@@ -1,2 +1,2 @@
-import{payload as e}from"../entry/payload.DSmR2FwN.js";import{$ as t,At as n,B as r,Ct as i,Et as a,F as o,H as s,I as c,L as l,M as u,P as d,R as f,Tt as p,X as m,bt as h,ct as g,et as _,gt as v,k as y,kt as ee,mt as b,o as te,pt as ne,t as re,w as ie,yt as x,z as ae}from"./BZp9foKd.js";import{i as oe,n as se,r as ce,t as le}from"./Bbkvzshl.js";import{a as ue,i as de,n as fe,t as pe,y as me}from"./C6Jfgk1u.js";import{a as S,c as he,i as ge,n as C,o as _e,r as w,s as ve,t as T}from"./z51mP5hD.js";function ye(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}function be(e,t){let n=[];return e&&n.push([...new Headers(e)].join(`,`)),t&&n.push(t),ye(...n)}new TextEncoder,new TextDecoder;function xe(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e Preparing a safe preview. You can still download the original file. Preview is limited to 10,000 cells, the first 1,000 rows, and the first 100 columns. Download the original to inspect omitted cells. Some slide content was omitted by preview limits. or Channels Direct messages Creating workspace… No pinned messages Pin important messages to keep them easily accessible. Try another word or phrase. Channel Archived channels move to the Archived section and keep their full message history. Browser notifications are not supported on this device. Browser notifications are blocked by this browser. Show alerts when ClickClack is in the background. Shown in messages, mentions, and your profile card. Used in mentions and the quick switcher. Must be unique. Paste a public image URL. Your initials show when empty. Keep agent reasoning summaries out of the message timeline. Hide tool execution details while keeping ordinary messages visible. Choose which side of the timeline shows your messages. Choose which side of the timeline shows messages from other people and agents. Add ClickClack to your Home Screen from the Share menu, then open it from there to turn this on. This browser does not support push notifications. Receive alerts when the app is closed. Send push notifications to your phone via Pushover. Find this in your Pushover dashboard under "Your User Key". Loading… Account Bots you own across your workspaces. Tokens live with the workspace where the bot was created. Account Changes apply instantly and follow your account on every device. Live preview — updates as you pick Workspace Loading... Account How you appear across ClickClack. End this session on this device. Account Decide when and how ClickClack should reach you. Loading thread… Preparing a safe preview. You can still download the original file. Preview is limited to 10,000 cells, the first 1,000 rows, and the first 100 columns. Download the original to inspect omitted cells. Some slide content was omitted by preview limits. or Channels Direct messages Creating workspace… No pinned messages Pin important messages to keep them easily accessible. Try another word or phrase. Channel Archived channels move to the Archived section and keep their full message history. Browser notifications are not supported on this device. Browser notifications are blocked by this browser. Show alerts when ClickClack is in the background. Shown in messages, mentions, and your profile card. Used in mentions and the quick switcher. Must be unique. Paste a public image URL. Your initials show when empty. Keep agent reasoning summaries out of the message timeline. Hide tool execution details while keeping ordinary messages visible. Choose which side of the timeline shows your messages. Choose which side of the timeline shows messages from other people and agents. Add ClickClack to your Home Screen from the Share menu, then open it from there to turn this on. This browser does not support push notifications. Receive alerts when the app is closed. Send push notifications to your phone via Pushover. Find this in your Pushover dashboard under "Your User Key". Loading… Account Bots you own across your workspaces. Tokens live with the workspace where the bot was created. Account Changes apply instantly and follow your account on every device. Live preview — updates as you pick Workspace Loading... Account How you appear across ClickClack. End this session on this device. Account Decide when and how ClickClack should reach you. Loading thread… Run the command below on the machine where OpenClaw lives. The one-time code mints the
+import{B as e,Ct as t,E as n,Et as r,I as i,M as a,Ot as o,R as s,Tt as c,U as l,W as u,X as d,_t as f,bt as p,ct as m,d as h,gt as g,ht as _,k as v,kt as y,lt as ee,m as te,mt as b,pt as x,s as ne,t as S,y as C,yt as w}from"./3rV_mZVO.js";import{a as re,b as ie,c as ae,d as oe,i as se,o as ce,r as le}from"./CVdgRPye.js";var ue=e(` Run the command below on the machine where OpenClaw lives. The one-time code mints the
bot's token there — no credential to copy by hand. Copy it now. ClickClack stores only a hash, so this is the last time the raw token is visible.
If you lose it, mint a new one and revoke this one. One-time code, single use. The code expires ten minutes after it was generated. A running That setup code expired before it was used. Codes last 10 minutes — generate a fresh one
when you're ready. Generating a setup code… A running OpenClaw gateway picks this up automatically. Not running yet? Start it with The commands above write this config for you. Use it for manual installs, or to add
diff --git a/apps/api/internal/webassets/dist/_app/immutable/chunks/BlJjnVwv.js b/apps/api/internal/webassets/dist/_app/immutable/chunks/Dc0sHp6m.js
similarity index 97%
rename from apps/api/internal/webassets/dist/_app/immutable/chunks/BlJjnVwv.js
rename to apps/api/internal/webassets/dist/_app/immutable/chunks/Dc0sHp6m.js
index 00cf6454b..d8ee4f8b3 100644
--- a/apps/api/internal/webassets/dist/_app/immutable/chunks/BlJjnVwv.js
+++ b/apps/api/internal/webassets/dist/_app/immutable/chunks/Dc0sHp6m.js
@@ -1 +1 @@
-import{B as e,Ct as t,Et as n,G as r,H as i,I as a,K as o,R as s,Tt as c,U as l,W as u,X as d,b as f,bt as p,ct as m,f as h,k as g,kt as _,mt as v,pt as y,t as b,v as x,y as S,yt as C,z as w}from"./BZp9foKd.js";import{i as T}from"./DEPNME54.js";function E(e){let t=e.trim();if(!t)return`?`;let n=t.split(/\s+/);return n.length>=2?(n[0][0]+n[1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function D(e){if(!e)return`?`;let t=e.trim();return t?t[0].toUpperCase():`?`}function O(e){return e?`@${e}`:``}function k(e){return e?.handle||e?.former_handle||``}function A(e){return e?.kind===`bot`&&!!e.deleted_at}function j(e,t=`Local User`){let n=e?.display_name||t;return A(e)?`${n} (deleted bot)`:n}function M(e){let t=0;for(let n=0;n No GIFs found ${this.parser.parseInline(e)} An error occurred: Your browser blocked clipboard access. Copy the selected link below. `),Or=n(` `),kr=n(` `),Ar=n(`
`),Pr=n(`
`),Vr=n(`
`),Hr=n(` Welcome.
Have a sign-in token?
Create channel
Start a DM
`),Ci=n(``),wi=n(`
`),ra=n(`Connecting…`),ia=n(`
Pinned Messages
`,1),Fa=n(``);function Ia(e,t){o(t,!0);let n=B(t,`covered`,3,!1),s=B(t,`inert`,3,!1),u=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}),d=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}),f=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,year:`numeric`});function p(e,t){let n=Array.from(e),r=[],i=0;for(let e of t){let t=Math.max(i,Math.min(n.length,e.start)),a=Math.max(t,Math.min(n.length,e.end));t>i&&r.push({text:n.slice(i,t).join(``),highlighted:!1}),a>t&&r.push({text:n.slice(t,a).join(``),highlighted:!0}),i=a}return i
Channel settings
Conversation display
Notifications
Desktop
Mobile push
`),po=n(`
My bots
Appearance
Profile settings
Notifications
`,1),Yo=n(``),Xo=n(``),Zo=n(``),Qo=n(``),$o=n(``),es=n(``),ts=n(``),ns=n(``),rs=n(``),is=n(`
`),ss=n(``),cs=n(``),ls=n(``),us=n(``),ds=n(`
`,1),fs=n(`ClickClack
`),ps=n(``),ms=n(``),hs=n(``),gs=n(``),_s=n(` `),Dr=n(` `),Or=n(` `),kr=n(`
`),Nr=n(`
`),Br=n(`
`),Vr=n(` Welcome.
Have a sign-in token?
Create channel
Start a DM
`),Si=n(``),Ci=n(`
`),na=n(`Connecting…`),ra=n(`
Pinned Messages
`,1),Pa=n(``);function Fa(e,t){o(t,!0);let n=B(t,`covered`,3,!1),s=B(t,`inert`,3,!1),u=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}),d=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}),f=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,year:`numeric`});function p(e,t){let n=Array.from(e),r=[],i=0;for(let e of t){let t=Math.max(i,Math.min(n.length,e.start)),a=Math.max(t,Math.min(n.length,e.end));t>i&&r.push({text:n.slice(i,t).join(``),highlighted:!1}),a>t&&r.push({text:n.slice(t,a).join(``),highlighted:!0}),i=a}return i
Channel settings
Conversation display
Notifications
Desktop
Mobile push
`),fo=n(`
My bots
Appearance
Profile settings
Notifications
`,1),Jo=n(``),Yo=n(``),Xo=n(``),Zo=n(``),Qo=n(``),$o=n(``),es=n(``),ts=n(``),ns=n(``),rs=n(`
`),os=n(``),ss=n(``),cs=n(``),ls=n(``),us=n(`
`,1),ds=n(`ClickClack
`),fs=n(``),ps=n(``),ms=n(``),hs=n(``),gs=n(`e.id===t))return;if(!e.all&&!e.seq){let e=Ja(t);if(e>=0&&!lo(t,e))return}let n=e.all?Math.max(e.seq||0,Ua(t)):e.seq||Wa(t);n<=0||(S(J).some(e=>e.id===t)?(Ha(t,n),e.all&&Ka(t,n)):S(q).some(e=>e.id===t)&&(Va(t,n),e.all&&Ka(t,n)))}function Ka(e,t){er.delete(e),er=new Map(er),W(q,S(q).map(n=>n.id===e?{...n,last_seq:Math.max(n.last_seq||0,t),last_read_seq:Math.max(n.last_read_seq||0,t),unread_count:0}:n)),W(J,S(J).map(n=>n.id===e?{...n,last_seq:Math.max(n.last_seq||0,t),last_read_seq:Math.max(n.last_read_seq||0,t),unread_count:0}:n))}function qa(e){let t=S(q).find(t=>t.id===e);return t?t.last_read_seq||0:S(J).find(t=>t.id===e)?.last_read_seq||0}function Ja(e){let t=S(q).find(t=>t.id===e);if(t)return za(e,t)>0?t.last_read_seq||0:-1;let n=S(J).find(t=>t.id===e);return n&&za(e,n)>0?n.last_read_seq||0:-1}function Ya(e,t,n){for(let r of t){if(!yo(r,e)||r.parent_message_id||r.author?.id===S(K)?.id||r.author_id===S(K)?.id)continue;let t=r.channel_seq;if(typeof t==`number`&&t>n)return r}return null}function Xa(e,t){if(!e)return;let n=co(e);if(za(e,n)<=0){er.delete(e),er=new Map(er);return}let r=n.last_read_seq||0,i=er.get(e);if(i?.boundarySeq===r&&i.since||!lo(e,r))return;let a=Ya(e,t,r);a&&(er=new Map(er).set(e,{boundarySeq:r,since:fo(a.created_at)}))}function Za(e,t,n){if(!e||!n)return;let r=er.get(e);r?.boundarySeq===t&&r.since||(er=new Map(er).set(e,{boundarySeq:t,since:fo(n)}))}function Qa(e){let t=e.payload,n=t.channel_seq??e.seq??t.seq;return typeof n==`number`?n:Number(n)||0}function $a(e){let t=e.payload;return{channelID:e.channel_id||(typeof t.channel_id==`string`?t.channel_id:``),dmID:typeof t.direct_conversation_id==`string`?t.direct_conversation_id:``}}async function eo(e){try{let t=await G(`/api/channels/${e}/notification-settings`);return io(e,t.preference),e===S(X)&&!S(Z)&&!S(qe)&&W(He,t.preference),t.preference}catch{return ro(e)||`all`}}function to(e){return S(K)?.id&&e?`clickclack:channel-notification:v1:${S(K).id}:${e}`:``}function no(e){let t=to(e);if(!t)return null;try{let e=window.localStorage.getItem(t);return e===`all`||e===`mentions`||e===`muted`?e:null}catch{return null}}function ro(e){return We.get(e)||no(e)}function io(e,t){We=new Map(We).set(e,t);let n=to(e);if(n)try{window.localStorage.setItem(n,t)}catch{}}async function ao(e,t){if(e.type!==`message.created`&&e.type!==`thread.reply_created`)return;let{channelID:n,dmID:r}=$a(e),i=Qa(e);if(e.type===`message.created`&&i>0){let e=n||r;if(i<=(Ke.get(e)||0))return;Ke.set(e,i)}let a=e.payload,o=typeof a.kind==`string`?a.kind:``;if(o===`agent_commentary`||o===`agent_tool`||!S(Cn)||document.visibilityState===`visible`&&t)return;if(n){let t=await eo(n);if(!t||!S(Cn))return;let r=n===S(X)&&!S(Z);if(document.visibilityState===`visible`&&r||t===`muted`||t===`mentions`&&!e.mentioned_user_ids?.includes(S(K)?.id||``))return}let s=typeof a.message_id==`string`?a.message_id:`${e.channel_id||``}:${e.seq||Date.now()}`,c=typeof a.author_id==`string`?a.author_id:``,l=typeof a.body==`string`?a.body:`New message`;if(e.type===`thread.reply_created`&&typeof a.message_id==`string`)try{let e=await G(`/api/messages/${a.message_id}`);c=e.message.author_id,l=e.message.body}catch{}if(c&&c===S(K)?.id||!S(Cn)||document.visibilityState===`visible`&&(n&&n===S(X)||r&&r===S(Z)))return;let u=S(q).find(e=>e.id===n),d=Ys(c)?.display_name||`ClickClack`,f=u?`#${_t(u)}`:`Direct message`;if(Kt)Kt.notify({body:oo(l),route:wi(n||r),tag:`clickclack:${s}`,title:`${d} in ${f}`});else if(typeof Notification<`u`&&Notification.permission===`granted`)try{let e=new Notification(`${d} in ${f}`,{body:oo(l),tag:`clickclack:${s}`,icon:`/favicon.svg`});e.onclick=()=>{window.focus(),e.close(),n?aa(n):r&&ps(r)}}catch{}}function oo(e){let t=e.replace(/!\[[^\]]*]\([^)]+\)/g,`[image]`).replace(/\[[^\]]+]\(([^)]+)\)/g,`$1`).replace(/[`*_>#|]/g,``).replace(/\s+/g,` `).trim();return t?t.length>180?`${t.slice(0,177)}...`:t:`New message`}async function so(e){let t=e.payload,n=typeof t.direct_conversation_id==`string`?t.direct_conversation_id:``;return!n||S(J).some(e=>e.id===n)?!1:(await ds(),S(J).some(e=>e.id===n))}function co(e){return S(q).find(t=>t.id===e)||S(J).find(t=>t.id===e)||{}}function lo(e,t,n=S(Rn)){if(!e||t<0)return!1;let r=n.get(e);if(!r||r.messages.length===0)return!1;let i=t+1;return r.oldest_seq<=i&&r.newest_seq>=i}function uo(e,t,n=S(Rn)){let r=er.get(e);if(r?.boundarySeq===t)return r.since;if(!lo(e,t,n))return``;let i=Ya(e,S(Je),t);return i?fo(i.created_at):``}function fo(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t)}function po(){if(!S(nr)||!S(In))return;let e=S(In).captureState();e&&Ln.set(S(nr),e)}function mo(e,t){let n=e!==S(nr);for(let[t,n]of ct)!n.message.status&&(n.draft.viewKey!==e||S(it)&&n.draft.topicID!==S(it))&&ct.delete(t);let r=Do(e).map(e=>e.message),i=new Map(r.map(e=>[e.id,e])),a=new Map(r.filter(e=>e.nonce).map(e=>[e.nonce,e]));Fe.seedMessages(t);let o=t.map(e=>{let t=i.get(e.id)||(e.nonce?a.get(e.nonce):void 0);return t?(!t.status&&(t.attachments||[]).every(t=>e.attachments?.some(e=>e.id===t.id))&&ct.delete(t.nonce),{...e,nonce:t.nonce,status:t.status,attachments:t.attachments?.length?t.attachments:e.attachments}):e}),s=new Set(o.map(e=>e.id)),c=new Set(o.map(e=>e.nonce).filter(Boolean)),l=r.filter(e=>!s.has(e.id)&&!(e.nonce&&c.has(e.nonce)));W(Je,[...o,...l].sort((e,t)=>(e.channel_seq||1/0)-(t.channel_seq||1/0))),Ie.reconcile(e,S(Je)),W(nr,e),Xa(e,S(Je)),n&&(W(_r,[]),W(yr,[]),sr())}function ho(e){_o(zn.updateMessage(e))}function go(e){_o(zn.updateAuthor(e))}function _o(e){let t=$(),n=t?S(Rn).get(t):void 0;if(e)for(let t of ct.values()){let n=t.message;t.message={...e(n),status:n.status,attachments:n.attachments},t.receipt&&=e(t.receipt)}let r=e?n?.messages.map(e)||[]:n?.messages||[];n?_a(t,{...n,messages:r},`append`):mo(t,r)}function vo(e){return e?.channel_seq||0}function yo(e,t){return t?e.channel_id===t||e.direct_conversation_id===t:!1}async function bo(e=()=>!0){await M(),e()&&await S(In)?.scrollToBottom()}function xo(){return S(In)?.isFollowing()||S(In)?.isNearBottom(96)!==!1}async function So(e=!1){let t=S(or)||S(Xn)||S(ae)>0,n=la();try{if(t&&await fa(n),await bo(n),!n())return;S(Xn)||Ga({all:!0}),await bo(n)}catch(t){n()&&(W(Dt,{kind:`error`,text:Ee(t,`Could not jump to latest messages`)}),e&&await bo(n))}}function Co(e,t,n=`tmp_${e}`){let r=new Date().toISOString();return{id:n,workspace_id:t.workspaceID,channel_id:t.channelID,direct_conversation_id:t.directConversationID,topic_id:t.topicID,author_id:S(K)?.id||``,thread_root_id:n,body:t.body,body_format:`markdown`,created_at:r,author:S(K)||void 0,attachments:t.upload?[t.upload]:[],quoted_message_id:t.quotedMessageID,nonce:e,status:`pending`}}async function wo(){let e=S(Yt).trim();if(!e)return;if(S(j)&&!S(te)){W(Dt,{kind:`error`,text:`This conversation has no active recipient`});return}if(!S(X)&&!S(Z)){W(Dt,{kind:`ephemeral`,text:`Pick or create a channel to send a message.`});return}sr(),W(Dt,null);let t=++zr,n=$(),r=S(Z)?`dm`:`channel`,i=S(fr)&&S(pr)===r?S(fr):null;if(S(X)&&!S(Z)&&!S(un)&&!i){let r=Ss(e),i=r?Cs(S(Tt),r.command):void 0;if(r&&i){W(Yt,``),ls(),await To(S(X),r.command,r.text,e,n,t);return}}let a={body:e,quotedMessageID:i?.id,upload:S(un)||void 0,workspaceID:S(Y),channelID:S(X)||void 0,directConversationID:S(Z)||void 0,topicID:S(X)&&S(tt)||void 0,topicFilterID:S(it),topicFilterGeneration:ot,viewKey:$()};W(Yt,``),i&&Jo(),ls(),await ko(a)}async function To(e,t,n,r,i,a){try{let r=await ws(e,t,n);if(a!==zr||$()!==i)return;r.text&&r.response_type!==`in_channel`&&W(Dt,{kind:`ephemeral`,text:r.text})}catch(e){if(console.warn(`slash dispatch failed`,e),a!==zr||$()!==i)return;W(Dt,{kind:`error`,text:e instanceof Te&&e.message?Eo(e):`${t} failed`}),S(Yt).trim()||W(Yt,r)}}function Eo(e){try{let t=JSON.parse(e.message);if(t&&typeof t.error==`string`&&t.error)return t.error}catch{}return e.message}function Do(e){return[...ct.values()].filter(({draft:t})=>t.viewKey===e&&(!S(it)||t.topicID===S(it)))}async function Oo(e,t,n,r){let{draft:i}=e;if(e.message=t,$()!==i.viewKey)return;let a=!1,o=S(it)===i.topicFilterID&&ot===i.topicFilterGeneration;if(r()&&o&&S(it)&&i.topicID!==S(it)){qr(``),Ln.delete(i.viewKey),S(Rn).delete(i.viewKey),r=la();try{await fa(r)}catch{a=!0}}$()===i.viewKey&&(S(it)&&i.topicID!==S(it)?(S(Yt).trim()||W(Yt,i.body),W(Dt,{kind:`error`,text:`${n} Clear the active topic filter to recover the draft.`})):(_o(),W(Dt,{kind:`error`,text:a?`${n} The unfiltered timeline could not reload.`:n}),await bo(r)))}async function ko(e,t,n){let r=Er,i=()=>Er===r&&$()===e.viewKey,a=t??Ye(),o=`tmp_${a}`,s=n??o,c=!S(it)||e.topicID===S(it),l=!t&&$()===e.viewKey&&c,u=Co(a,e,s),d={draft:e,message:u,receipt:ct.get(a)?.receipt};ct.set(a,d),$()===e.viewKey&&c&&(_o(),t||bo());let f=e.directConversationID?`/api/dms/${e.directConversationID}/messages`:`/api/channels/${e.channelID}/messages`,p={body:e.body,nonce:a};e.quotedMessageID&&(p.quoted_message_id=e.quotedMessageID),e.topicID&&(p.topic_id=e.topicID),e.upload&&(p.upload_id=e.upload.id);try{let t=d.receipt||(await G(f,{method:`POST`,body:JSON.stringify(p)})).message;if(d.receipt=t,e.upload&&!t.attachments?.some(t=>t.id===e.upload?.id))try{await G(`/api/messages/${t.id}/attachments`,{method:`POST`,body:JSON.stringify({upload_id:e.upload.id})}),t={...t,attachments:[...t.attachments||[],e.upload]}}catch(n){console.warn(`attachment fallback failed`,n),await Oo(d,{...t,nonce:a,status:`failed`,attachments:[...t.attachments||[],e.upload]},`The message was sent, but its attachment failed. Retry or discard it below.`,i);return}d.receipt=t,d.message={...t,nonce:a},$()===e.viewKey?_o():ct.delete(a)}catch(t){console.warn(`send failed`,t),await Oo(d,{...u,status:`failed`},e.upload?`The attachment failed, so the message was not sent. Retry or discard it below.`:`The message failed to send. Retry or discard it below.`,i);return}i()&&l&&await So(!0)}function Ao(e){if(!e.nonce)return;let t=ct.get(e.nonce)?.draft;t&&ko(t,e.nonce,e.id)}function jo(e){if(!e.nonce)return;let t=ct.get(e.nonce);t?.receipt?t.message={...t.receipt,nonce:e.nonce}:ct.delete(e.nonce),_o()}async function Mo(e,t){let n=Q.selection,r=()=>e===S(ir)&&Ie.session(e)?.generation===t.generation&&(t.surface!==`thread`||Q.selection===n);if(r()){if(wr++,t.surface===`thread`){if(t.threadRootID&&n?.messageID!==t.threadRootID&&(W(ut,!1),Q.select(t.threadRootID),n=Q.selection,!await Lo(t.threadRootID,void 0,r))||!await Q.target({messageID:t.messageID,threadSeq:t.threadSeq},r)||!r())return;Q.root?.route_id&&await Oi(S(Y),Q.root.id)}else S(In)?.scrollToMessage(t.messageID),await Oi(S(Y),Q.root?.id||$());for(let e=0;e<16;e+=1){if(await M(),await new Promise(e=>requestAnimationFrame(()=>e())),!r())return;let e=document.querySelector(t.surface===`timeline`?`main.timeline`:`[aria-label="Thread pane"]`)?.querySelector(`[data-message-id="${CSS.escape(t.messageID)}"]`)?.querySelector(`textarea[aria-label="Edit message"]`);if(e){e.focus({preventScroll:!0});return}}}}function No(e){ho(e),Q.updateMessage(e),W(dt,S(dt).map(t=>t.id===e.id?Xe(t,e):t))}function Po(e){!e.id||e.deleted_at||S(Ur).has(e.id)||(W(Wr,e),W(Gr,``))}async function Fo(){let e=S(Wr);if(e&&!S(Ur).has(e.id)){W(Ur,new Set([...S(Ur),e.id])),W(Gr,``);try{let t=(await G(`/api/messages/${e.id}`,{method:`DELETE`})).message;Ie.cancelMessage($(),t.id),ho(t),Q.updateMessage(t),W(dt,S(dt).filter(e=>e.id!==t.id)),S(fr)?.id===t.id&&Jo(),W(Wr,null)}catch(e){W(Gr,e instanceof Error?e.message:`Could not delete message`)}finally{let t=new Set(S(Ur));t.delete(e.id),W(Ur,t)}}}async function Io(e){wr++,ns(),W(ut,!1),await Lo(e.id,e)&&S(Y)&&Q.root?.route_id&&await Oi(S(Y),Q.root.id)}async function Lo(e,t,n=()=>!0){W(Rt,null),W(zt,``),W(lt,null),W(gr,`thread`),Q.select(e,t);try{return await Q.open(n)}catch{return!1}}function Ro(e=[]){let t=Q.root;t&&(Fe.seedMessages(e),Ie.reconcile($(),[t,...Q.replies]),ho({id:t.id,thread_state:t.thread_state}))}async function zo(e){await zn.run(()=>G(`/api/messages/${e}/thread?latest=true&limit=1`),e=>{let t={...e.root,thread_state:e.thread_state};Fe.seedMessages([t]),ho(t)})}async function Bo(e,t){(S(Je).some(t=>t.id===e)||zn.pending)&&await zn.run(()=>G(`/api/messages/${e}`),e=>ho(e.message),t)}function Vo(e,t){let n=S(Je).find(t=>t.id===e);if(!n)return!1;let r=new Date(t.created_at).getTime();if(Number.isFinite(r)&&r Your bot is ready to connect
Your bot is ready to connect
Your new token is ready
openclaw gateway picks the new channel up automatically. openclaw gateway. `),H=e(``),U=e(``);function W(e,l){n(l,!0);let T=b(l,`class`,3,`avatar`),E=b(l,`size`,3,40),O=b(l,`loading`,3,`lazy`),k=b(l,`fetchPriority`,3,`low`),A=p(``),j=t(()=>B(l.src)),N=t(()=>d(j)!==``&&d(A)!==d(j)),P=t(()=>M(l.id||l.name||d(j)||`avatar`)),F=t(()=>D(l.name));function I(){C(A,d(j),!0)}var L=w(),R=v(L),z=e=>{var t=H(),n=y(t),c=e=>{var t=V();m(()=>{h(t,`src`,d(j)),h(t,`width`,E()),h(t,`height`,E()),h(t,`loading`,O()),h(t,`fetchpriority`,k())}),r(`error`,t,I),o(t),s(e,t)},p=e=>{var t=i();m(()=>a(t,d(F))),s(e,t)};g(n,e=>{d(N)?e(c):e(p,-1)}),_(t),m(()=>{S(t,1,f(T())),x(t,`--hue: ${d(P)??``}deg`),h(t,`aria-label`,l.buttonLabel)}),u(`click`,t,function(...e){l.onclick?.apply(this,e)}),s(e,t)},W=e=>{var t=U(),n=y(t),c=e=>{var t=V();m(()=>{h(t,`src`,d(j)),h(t,`width`,E()),h(t,`height`,E()),h(t,`loading`,O()),h(t,`fetchpriority`,k())}),r(`error`,t,I),o(t),s(e,t)},l=e=>{var t=i();m(()=>a(t,d(F))),s(e,t)};g(n,e=>{d(N)?e(c):e(l,-1)}),_(t),m(()=>{S(t,1,f(T())),x(t,`--hue: ${d(P)??``}deg`)}),s(e,t)};g(R,e=>{l.buttonLabel?e(z):e(W,-1)}),s(e,L),c()}l([`click`]);export{F as a,P as c,j as d,k as f,I as i,O as l,M as n,L as o,E as p,D as r,N as s,W as t,A as u};
\ No newline at end of file
+import{B as e,Ct as t,Et as n,G as r,H as i,I as a,K as o,R as s,Tt as c,U as l,W as u,X as d,b as f,bt as p,ct as m,f as h,k as g,kt as _,mt as v,pt as y,t as b,v as x,y as S,yt as C,z as w}from"./3rV_mZVO.js";import{i as T}from"./DEPNME54.js";function E(e){let t=e.trim();if(!t)return`?`;let n=t.split(/\s+/);return n.length>=2?(n[0][0]+n[1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function D(e){if(!e)return`?`;let t=e.trim();return t?t[0].toUpperCase():`?`}function O(e){return e?`@${e}`:``}function k(e){return e?.handle||e?.former_handle||``}function A(e){return e?.kind===`bot`&&!!e.deleted_at}function j(e,t=`Local User`){let n=e?.display_name||t;return A(e)?`${n} (deleted bot)`:n}function M(e){let t=0;for(let n=0;n
`),H=e(``),U=e(``);function W(e,l){n(l,!0);let T=b(l,`class`,3,`avatar`),E=b(l,`size`,3,40),O=b(l,`loading`,3,`lazy`),k=b(l,`fetchPriority`,3,`low`),A=p(``),j=t(()=>B(l.src)),N=t(()=>d(j)!==``&&d(A)!==d(j)),P=t(()=>M(l.id||l.name||d(j)||`avatar`)),F=t(()=>D(l.name));function I(){C(A,d(j),!0)}var L=w(),R=v(L),z=e=>{var t=H(),n=y(t),c=e=>{var t=V();m(()=>{h(t,`src`,d(j)),h(t,`width`,E()),h(t,`height`,E()),h(t,`loading`,O()),h(t,`fetchpriority`,k())}),r(`error`,t,I),o(t),s(e,t)},p=e=>{var t=i();m(()=>a(t,d(F))),s(e,t)};g(n,e=>{d(N)?e(c):e(p,-1)}),_(t),m(()=>{S(t,1,f(T())),x(t,`--hue: ${d(P)??``}deg`),h(t,`aria-label`,l.buttonLabel)}),u(`click`,t,function(...e){l.onclick?.apply(this,e)}),s(e,t)},W=e=>{var t=U(),n=y(t),c=e=>{var t=V();m(()=>{h(t,`src`,d(j)),h(t,`width`,E()),h(t,`height`,E()),h(t,`loading`,O()),h(t,`fetchpriority`,k())}),r(`error`,t,I),o(t),s(e,t)},l=e=>{var t=i();m(()=>a(t,d(F))),s(e,t)};g(n,e=>{d(N)?e(c):e(l,-1)}),_(t),m(()=>{S(t,1,f(T())),x(t,`--hue: ${d(P)??``}deg`)}),s(e,t)};g(R,e=>{l.buttonLabel?e(z):e(W,-1)}),s(e,L),c()}l([`click`]);export{F as a,P as c,j as d,k as f,I as i,O as l,M as n,L as o,E as p,D as r,N as s,W as t,A as u};
\ No newline at end of file
diff --git a/apps/api/internal/webassets/dist/_app/immutable/chunks/B528fjuC.js b/apps/api/internal/webassets/dist/_app/immutable/chunks/DhretNy_.js
similarity index 99%
rename from apps/api/internal/webassets/dist/_app/immutable/chunks/B528fjuC.js
rename to apps/api/internal/webassets/dist/_app/immutable/chunks/DhretNy_.js
index 45a412f67..7527fb237 100644
--- a/apps/api/internal/webassets/dist/_app/immutable/chunks/B528fjuC.js
+++ b/apps/api/internal/webassets/dist/_app/immutable/chunks/DhretNy_.js
@@ -1 +1 @@
-import{C as e,Ct as t,E as n,Et as r,M as i,N as a,R as o,Tt as s,X as c,_t as l,bt as u,et as d,j as f,lt as p,mt as m,o as h,t as g,u as _,ut as v,yt as y,z as b}from"./BZp9foKd.js";var x=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return r==null?t:t+`${n}:${r};`},``),S=(e,t)=>e[0]===t[0]&&e[1]===t[1],C=(e,t)=>`_`+t,w,{min:T,max:E,abs:D,floor:O}=Math,k=(e,t,n)=>E(t,T(n,e)),A=e=>e.sort((e,t)=>e-t),j=setTimeout,M=clearTimeout,N=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)},P=()=>{let e;return[new Promise(t=>{e=t}),e]},F=e=>e.ownerDocument,I=e=>e.defaultView,L=()=>(w??=/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>0,w),R=e=>E(e.$getTotalSize(),e.$getViewportSize()),z=({$getRange:e,$findIndex:t,$getItemOffset:n,$getItemSize:r,$setItemSizes:i,$getTotalSize:a,$getLength:o,$setLength:s,$isEstimating:c},l=0)=>{let u=!!l,d=1,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y=0,b=null,x=[0,u?E(l-1,0):-1],S=!1,C=new Set,w=()=>m-p,O=()=>w()+g+h,k=(e,t)=>{let i=n(e),a=r(e);return v!==1&&y===0?i+a<=t:i
`),ut=e(``),dt=e(``),ft=e(`
-`:``+(n?i:wi(i,!0))+`
-`}blockquote({tokens:e}){return``+(n?i:wi(i,!0))+`
-${this.parser.parse(e)}
-`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`
-`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t
-
-`+t+`
-`+r+`
-`}tablerow({text:e}){return`
-${e}
-`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`${n}>
-`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${wi(e,!0)}`}br(e){return`
`}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?wi(n,!0):this.parser.parseInline(r),o=Ei(e);if(o===null)return a;e=wi(o,i);let s=``+a+``,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ei(e);if(i===null)return wi(n);e=i;let a=``,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:wi(e.text)}},Gi=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`
-`}checkbox({raw:e}){return e}},Ki=class e{options;renderer;textRenderer;constructor(e){this.options=e||tr,this.options.renderer=this.options.renderer||new Wi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gi,this.textRenderer.parser=this}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n
`+wi(n.message+``,!0)+`
`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return Yi.parse(e,t)}$.options=$.setOptions=function(e){return Yi.setOptions(e),$.defaults=Yi.defaults,nr($.defaults),$},$.getDefaults=er,$.defaults=tr;function Xi(...e){return Yi.use(...e),$.defaults=Yi.defaults,nr($.defaults),$}$.use=Xi,$.walkTokens=function(e,t){return Yi.walkTokens(e,t)},$.parseInline=Yi.parseInline,$.Parser=Ki,$.parser=Ki.parse,$.Renderer=Wi,$.TextRenderer=Gi,$.Lexer=Ui,$.lexer=Ui.lex,$.Tokenizer=Hi,$.Hooks=qi,$.parse=$,$.options,$.setOptions,$.walkTokens,$.parseInline,Ki.parse,Ui.lex;function Zi(e){return Bn.sanitize($.parse(e,{async:!1,breaks:!0,gfm:!0}))}function Qi(e){return new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}).format(new Date(e))}var $i=e(``);function ea(e,t){i(t,!0);let n=_(null),r=_(null),a=_(null),o=typeof document<`u`&&document.activeElement instanceof HTMLElement?document.activeElement:null,l=o?.closest(`.thread`),f=o?.closest(`.timeline`),h=l?.querySelector(`[aria-label="Reply body"]:not(:disabled)`)??l?.querySelector(`[aria-label="Close thread"]`)??f?.querySelector(`[aria-label="Message body"]:not(:disabled)`)??f?.querySelector(`[aria-label="Search messages"]`)??(typeof document<`u`?document.querySelector(`[aria-label="Reply body"]:not(:disabled)`)??document.querySelector(`[aria-label="Message body"]:not(:disabled)`)??document.querySelector(`[aria-label="Close thread"]`)??document.querySelector(`[aria-label="Search messages"]`):null),g=new Set;c(()=>{let e=m(n)?.parentElement;if(e)for(let t of e.children)t instanceof HTMLElement&&t!==m(n)&&!t.inert&&(t.inert=!0,g.add(t));m(a)?.focus({preventScroll:!0})}),w(()=>{for(let e of g)e.inert=!1;g.clear(),o?.isConnected&&o!==document.body&&(o.focus({preventScroll:!0}),document.activeElement===o)||h?.isConnected&&h.focus({preventScroll:!0})});function y(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),t.onClose();return}if(e.key!==`Tab`||!m(r))return;let n=Array.from(m(r).querySelectorAll(`a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.inert&&e.getClientRects().length>0);if(n.length===0){e.preventDefault(),m(r).focus();return}let i=n[0],a=n[n.length-1];e.shiftKey&&(document.activeElement===i||!m(r).contains(document.activeElement))?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a&&m(r).contains(document.activeElement)||(e.preventDefault(),i.focus())}var b=$i(),T=A(b),D=S(T,2),O=A(D),ee=A(O),j=C(ee,!0),te=S(ee,2),ne=A(te),re=S(ne,2);k(re,e=>N(a,e),()=>m(a)),E(te),E(O);var M=S(O,2),ie=C(M);E(D),k(D,e=>N(r,e),()=>m(r)),E(b),k(b,e=>N(n,e),()=>m(n)),v(()=>{x(D,`aria-label`,`Image viewer: ${t.title}`),s(j,t.title),x(ne,`href`,t.url),x(ie,`src`,t.url),x(ie,`alt`,t.title)}),p(`click`,T,function(...e){t.onClose?.apply(this,e)}),p(`keydown`,D,y),p(`click`,re,function(...e){t.onClose?.apply(this,e)}),u(e,b),d()}f([`click`,`keydown`]);var ta=e(``);function na(e,t){let n=j(t,`size`,3,44),r=j(t,`class`,3,``);var i=ta();v(()=>{M(i,1,`keystroke-mark ${r()??``}`,`svelte-1bx7eka`),te(i,`--keystroke-size: ${n()??``}px`)}),u(e,i)}var ra=e(`Copy message link
`),M=t(`
Danger zone
Overview
`),M=t(`
Danger zone
Overview