openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 1.97 kB
JavaScript
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{BA as t,dj as n,mj as r,pj as i,zA as a}from"./control-ui-boot-shared-DFTSUQQ0.js";import{C as o,O as s,U as c,d as l,f as u,g as d,j as f,l as p,s as m,u as h,x as g}from"./solid-runtime-C416s-HC.js";import{mc as _,pc as v}from"./control-ui-boot-chat-DewxEbIm.js";function y(e){let t=()=>e.canResolve&&(e.role===`owner`||e.role===`admin`);return f(s,{get when(){return e.suggestions.length>0},get children(){var n=b();return l(n,f(o,{get each(){return e.suggestions},keyed:e=>e.id,children:n=>{let i=()=>n().author.label??n().author.id;var c=S(),m=c.firstChild,h=m.nextSibling;return l(m,i),l(h,()=>n().text),l(c,f(s,{get when(){return u(()=>!!t())()?n().state===`pending`:t()},get fallback(){var e=C();return l(e,()=>r(`chat.sessionSuggestions.state.${n().state}`)),e},get children(){var t=x();return l(t,f(o,{each:T,children:t=>f(s,{get when(){return!e.archived||t[0]===`dismiss`},get children(){var o=w();return o._$$click=()=>e.onResolve(n(),t[0]),l(o,f(a,{get name(){return t[2]}})),p(()=>({e:e.busyIds.has(n().id),t:r(`chat.sessionSuggestions.${t[1]}`,{author:i()}),a:r(`chat.sessionSuggestions.${t[1]}`,{author:i()})}),({e,t,a:n},r)=>{e!==r?.e&&d(o,`disabled`,e),t!==r?.t&&d(o,`aria-label`,t),n!==r?.a&&d(o,`title`,n)}),o}})})),t}}),null),p(()=>n().id,e=>{d(c,`data-suggestion-id`,e)}),c}})),n}})}var b,x,S,C,w,T;function E(){return(E=e((()=>{h(),c(),t(),v(),n(),b=g(`<div class=session-suggestions aria-live=polite>`),x=g(`<div class=session-suggestion__actions>`),S=g(`<article class=session-suggestion><span class=session-suggestion__author></span><span class=session-suggestion__text>`),C=g(`<span class=session-suggestion__state>`),w=g(`<button class="btn btn--ghost btn--icon session-suggestion__action"type=button>`),i(_),T=[[`send`,`sendNow`,`arrowUp`],[`queue`,`queue`,`check`],[`edit`,`edit`,`edit`],[`dismiss`,`dismiss`,`trash`]],m([`click`])})))()}E();export{y as ChatSessionSuggestions};