compaction de contexte, filtre/pagination/suppression des conversations
- compaction automatique du contexte LLM quand la taille atteint le seuil (contexte max - taille de réponse max), par résumé de l'historique ancien - filtre textuel (?q=) et pagination (20/page) de l'historique des conversations - correctif ORM : offset de pagination en base 0 - suppression d'une conversation : messages associés supprimés, session en cours annulée, popup de confirmation (ConfirmDialog) - titres de conversation nettoyés du markdown - styles des listes markdown, variante danger du bouton - go.mod/go.sum : dépendances go-rod et stealth manquantes du commit précédent
This commit is contained in:
1 parent
a970bfa991
commit
51bbb45b32
86 files changed
+770
-113
No files matched your search
@@ -0,0 +1,6 @@
|
||||
import{$ as e,A as t,B as n,D as r,E as i,F as a,H as o,I as s,K as c,L as l,M as u,N as d,P as f,Q as p,R as m,T as h,U as g,X as _,Z as v,_ as y,a as b,at as x,b as ee,c as te,dt as ne,et as S,f as re,ft as ie,h as ae,it as oe,j as C,k as w,m as se,n as ce,nt as T,p as le,q as E,r as ue,u as de,v as fe,vt as D}from"./DGrvnoUE.js";import"./Soo4K-rz.js";import"./xihTtKlq.js";import"./B6JECYQD.js";var pe=Math.min,O=Math.max,me=Math.round,he=Math.floor,k=e=>({x:e,y:e}),A={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function j(e,t,n){return O(e,pe(t,n))}function ge(e,t){return typeof e==`function`?e(t):e}function M(e){return e.split(`-`)[0]}function N(e){return e.split(`-`)[1]}function P(e){return e===`x`?`y`:`x`}function F(e){return e===`y`?`height`:`width`}function I(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function _e(e){return P(I(e))}function ve(e,t,n){n===void 0&&(n=!1);let r=N(e),i=_e(e),a=F(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ee(o)),[o,Ee(o)]}function ye(e){let t=Ee(e);return[be(e),t,be(t)]}function be(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var xe=[`left`,`right`],Se=[`right`,`left`],Ce=[`top`,`bottom`],L=[`bottom`,`top`];function we(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Se:xe:t?xe:Se;case`left`:case`right`:return t?Ce:L;default:return[]}}function Te(e,t,n,r){let i=N(e),a=we(M(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(be)))),a}function Ee(e){let t=M(e);return A[t]+e.slice(t.length)}function De(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Oe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:De(e)}function ke(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ae(e,t,n){let{reference:r,floating:i}=e,a=I(t),o=_e(t),s=F(o),c=M(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=N(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function je(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ge(t,e),p=Oe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ke(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ke(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Me=50,Ne=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:je},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ae(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Me&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ae(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pe=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ge(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=M(r),_=I(o),v=M(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ee(o)]:ye(o)),x=p!==`none`;!d&&x&&b.push(...Te(o,m,p,y));let ee=[o,...b],te=await s.detectOverflow(t,h),ne=[],S=i.flip?.overflows||[];if(l&&ne.push(te[g]),u){let e=ve(r,a,y);ne.push(te[e[0]],te[e[1]])}if(S=[...S,{placement:r,overflows:ne}],!ne.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=ee[e];if(t&&(u!==`alignment`||_===I(t)||S.every(e=>I(e.placement)!==_||e.overflows[0]>0)))return{daLine truncated
|
||||
3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0
|
||||
1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502
|
||||
0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0
|
||||
0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>`);function Nt(e){var t=Mt();C(e,t)}var Q=f(`<svg width="100%" height="100%" viewBox="-2 -2 50 50" focusable="false" aria-hidden="true" role="presentation"><path fill="currentColor" d="M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124
|
||||
l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"></path></svg>`);function Pt(e){var t=Q();C(e,t)}var Ft=f(`<svg class="loading" viewBox="25 25 50 50"><circle class="circle_path" cx="50" cy="50" r="20" fill="none" stroke="currentColor" stroke-width="5" stroke-miterlimit="10"></circle></svg>`);function It(e){var t=Ft();C(e,t)}var Lt=d(`<div class="list-item" tabindex="-1" role="none"><div><!></div></div>`),Rt=d(`<div class="empty">No options</div>`),zt=d(`<div role="none"><!> <!> <!></div>`),Bt=d(`<span id="aria-selection"> </span> <span id="aria-context"> </span>`,1),Vt=d(`<div class="multi-item-clear"><!></div>`),Ht=d(`<div role="none"><span class="multi-item-text"><!></span> <!></div>`),Ut=d(`<div><!></div>`),Wt=d(`<div class="icon loading" aria-hidden="true"><!></div>`),Gt=d(`<button type="button" class="icon clear-select"><!></button>`),Kt=d(`<div class="icon chevron" aria-hidden="true"><!></div>`),qt=d(`<input type="hidden"/>`),Jt=d(`<select class="required" required="" tabindex="-1" aria-hidden="true"></select>`),Yt=d(`<div role="none"><!> <span aria-live="polite" aria-atomic="false" aria-relevant="additions text" class="a11y-text"><!></span> <div class="prepend"><!></div> <div class="value-container"><!> <input/></div> <div class="indicators"><!> <!> <!></div> <!> <!></div>`);function Xt(o,s){ie(s,!0);let d,f=b(s,`valueMode`,3,`item`),pe=b(s,`filter`,3,At),O=b(s,`getItems`,3,jt),me=b(s,`id`,3,null),he=b(s,`name`,3,null),k=b(s,`container`,15,null),A=b(s,`input`,15,null),j=b(s,`multiple`,3,!1),ge=b(s,`multiFullItemClearable`,3,!1),M=b(s,`disabled`,3,!1),N=b(s,`focused`,15,!1),P=b(s,`value`,15),F=b(s,`filterText`,15,``),I=b(s,`placeholder`,3,`Please select`),_e=b(s,`placeholderAlwaysShow`,3,!1),ve=b(s,`items`,31,()=>S([])),ye=b(s,`label`,3,`label`),be=b(s,`itemFilter`,3,(e,t,n)=>`${e}`.toLowerCase().includes(t.toLowerCase())),xe=b(s,`groupBy`,3,void 0),Se=b(s,`groupFilter`,3,e=>e),Ce=b(s,`groupHeaderSelectable`,3,!1),L=b(s,`itemId`,3,`value`),we=b(s,`loadOptions`,3,void 0),Te=b(s,`containerStyles`,3,``),Ee=b(s,`hasError`,3,!1),De=b(s,`filterSelectedItems`,3,!0),Oe=b(s,`required`,3,!1),ke=b(s,`closeListOnChange`,3,!0),Ae=b(s,`clearFilterTextOnBlur`,3,!0),je=b(s,`createGroupHeaderItem`,3,(e,t)=>({value:e,[ye()]:e})),Me=b(s,`searchable`,3,!0),Ne=b(s,`inputStyles`,3,``),Pe=b(s,`clearable`,3,!0),Fe=b(s,`loading`,15,!1),R=b(s,`listOpen`,15,!1),Ie=b(s,`debounce`,3,(e,t=1)=>{clearTimeout(d),d=setTimeout(e,t)}),Le=b(s,`debounceWait`,3,300),Re=b(s,`hideEmptyState`,3,!1),z=b(s,`inputAttributes`,19,()=>({})),B=b(s,`listAutoWidth`,3,!0),V=b(s,`showChevron`,3,!1),ze=b(s,`listOffset`,3,5),H=b(s,`hoverItemIndex`,15,0),U=b(s,`floatingConfig`,19,()=>({})),Be=b(s,`class`,3,``),Ve=b(s,`ariaValues`,3,e=>`Option ${e}, selected.`),He=b(s,`ariaListOpen`,3,(e,t)=>`You are currently focused on option ${e}. There are ${t} results available.`),Ue=b(s,`ariaFocused`,3,()=>`Select is focused, type to refine list, press down to open the menu.`);function We(){return n(Z)}let W=oe(void 0),G,Ge,Ke,qe,K=oe(null),q={},J=x(()=>{if(z()||!Me()){let e=Object.assign({autocapitalize:`none`,autocomplete:`off`,autocorrect:`off`,spellcheck:!1,tabindex:0,type:`text`,"aria-autocomplete":`list`},z());me()&&(e.id=me()),Me()||(e.readonly=!0),JSON.stringify(e)!==JSON.stringify(q)&&(q=e)}return q});function Y(e){return e==null?e:typeof e==`object`?e[L()]:e}function Je(e){return Array.isArray(e)&&e.length>0&&typeof e[0]!=`object`}let Ye=x(()=>f()===`id`||Je(ve()));function Xe(e){return n(Ye)?Y(e):e}function Ze(e){if(e==null)return e;if(typeof e==`object`)return e[ye()];let t=ve()?.find(t=>t[L()]===e);return t?t[ye()]:e}function Qe(){return P()==null?null:n(Ye)?j()&&Array.isArray(P())?JSON.stringify(P()):`${P()}`:JSON.stringify(P())}function $e(e){return e.map((e,t)=>({index:t,value:e,label:`${e}`}))}function et(e){if(!xe())return e;let t=[],n={};e.forEach(e=>{let r=xe()(e)??``;t.includes(r)||(t.push(r),n[r]=[],r&&n[r].push(Object.assign(je()(r,e),{id:r,groupHeader:!0,selectable:Ce()}))),n[r].push(Object.assign({groupItem:!!r},e))});let r=[];return Se()(t).forEach(e=>{n[e]&&r.push(...n[e])}),r}function tt(){if(j()){JSON.stringify(P())!==JSON.stringify(G)&&(!P()||_t())&&s.oninput?.(P());return}P()?(!G||JSON.stringify(Y(P()))!==JSON.stringify(Y(G)))&&s.oninput?.(P()):G&&s.oninput?.(P())}function nt(){Ke=!0,P()&&(Array.isArray(P())||P([P()]))}function rt(){Ke=!1,P()&&P(void 0)}function X(){it(n(Z).findIndex(e=>e[L()]===Y(P())),!0)}function it(e=0,t){let r=e<0?0:e;H()!==r&&H(r),!t&&xe()&&n(Z)[H()]&&!n(Z)[H()].selectable&&tn(1)}function at(){!we()&&F().length===0||(we()?Ie()(async function(){Fe(!0);let e=await O()({onerror:s.onerror,onloaded:s.onloaded,loadOptions:we(),convertStringItemsToObjects:$e,filterText:F()});e?(Fe(e.loading),R(R()?e.listOpen:F().length>0),N(R()&&e.focused),ve(xe()?et(e.filteredItems):e.filteredItems)):(Fe(!1),N(!0),R(!0))},Le()):(R()||R(!0),j()&&T(W,void 0)))}let ot=x(()=>j()?Array.isArray(P())&&P().length>0:!!P()),st=x(()=>n(Line truncated
|
||||
Reference in new issue
Block a user