PageSourceSearch

https://static.getchipbot.com/a/2026/09/25/790414e5/CannedResponsesPage.CFdH-3OH.js

js getchipbot.com collected 2026-09-25 14:30:58 UTC 5,847 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sentryUtil.CEsrFXuJ.js","./main.DYJSYA6X.js","./react.D23SOY48.js","./react-deps.BYJtbOYg.js","./main.CXLkAfX4.css","./messagesReducers.vu3QILHi.js"])))=>i.map(i=>d[i]);
2import{k as M,l as D,s as l,n as a,_ as k}from"./main.DYJSYA6X.js";import{a as c,j as e}from"./react.D23SOY48.js";import{u as L,l as w}from"./react-deps.BYJtbOYg.js";import{u as H}from"./useNewMessageCallback.m_HWlnvU.js";import{u as O,D as v,b4 as B,bP as b,R as G,J as K,H as $}from"./AnchorLinkCbArticle.D7lSWlmV.js";import{P as U}from"./PageHeader.BUbjr1b1.js";import{D as Y}from"./screensActions.CEg0FpzB.js";import{g as q,d as J}from"./insightReducers.Dj-08rvU.js";import{D as V}from"./DialogConfirmation.Dvq4W9JZ.js";import{i as u,I as n,bb as W,bc as z,D as Q,s as X,R as Z}from"./LogoutPage.q4jX-R9B.js";import{g as y}from"./KbTree.CZwDzxYp.js";import{C as ee}from"./useDirectConfig.DUGHaAyz.js";import{q as te}from"./domainReducers.DFwZ465J.js";import{C as re}from"./useDashboardLeftNavWidth.xFjaja1k.js";import{A as se}from"./AddNodeDialog.DF6T8iIl.js";import{d as f}from"./useQuery.8IHTIQJ9.js";import{showSavedToast as ie,showFailedToast as oe}from"./toasters.DTJ-JB_V.js";import{f as ae}from"./messagesReducers.vu3QILHi.js";import{E as ne}from"./EditNodeDialog.DbL5sQxG.js";import{F as de}from"./formGroup.3Ne6uUdW.js";import{H as le}from"./htmlSelect.BUDFFdjl.js";import{B as p}from"./buttons.Bv4saRqe.js";import{H as me}from"./companyPlansActions.kloQS-uj.js";import"./emotion.DVT5q8IN.js";import"./useIsAccountPlanSupported.a_-MVCUa.js";import"./dialog.Byy3mEJJ.js";import"./index.DWpueHCC.js";import"./splitPathsBySizeLoader.De2WWJPJ.js";import"./resizeSensor.102ckI7_.js";import"./analyticsUtil.DveZKJXV.js";import"./html.BtDJszHT.js";import"./overlay2.KBrsItLg.js";import"./text.BiVczX0T.js";import"./small-cross.CCCKD1lS.js";import"./tree.D6mN0izg.js";import"./collapse.LhQYF8eu.js";import"./tooltip.ix_KdXro.js";import"./popoverPlacementUtils.ClvuiSYt.js";import"./popoverNextMigrationUtils.Bjr6nFI6.js";import"./callout.cP8LNVAv.js";import"./aiToolConnectionsApi.Cb85sZSM.js";import"./CalloutFormError.Bne-htgU.js";import"./useStateValidation.DaGUdRJD.js";import"./LiveDemoPage.C49VfKVL.js";import"./IconSelector.Di3a9T1d.js";import"./assetsApi.7foBVIgc.js";import"./overlayToaster.Ot9ut2fL.js";import"./messageFlowApi.BQv3ZrKY.js";import"./InputTextAreaExpand.DLCPanTU.js";function at(){const{userId:_,accountId:d,domainId:E}=O();H([{path:B,label:v},{label:b}]);const S=()=>l.dispatch(q(_,d,E,a));c.useEffect(()=>{S()},[]);const{flatKbTreeMsgConfig:A}=L(t=>({flatKbTreeMsgConfig:t.flatKbTreeMsgConfig})),i=y(a),[F,C]=c.useState(i.id),[r,h]=c.useState(null),x=c.useRef(!1),m=A.filter(t=>t.type===M),s=m.find(t=>t.id===F)||i,R=A.filter(t=>t.type===D&&t.parentId===s.id);c.useEffect(()=>{const t=w(m)||i;x.current&&C(t.id)},[m.map(t=>t.id).sort().join("")]);const P=()=>{x.current=!0,l.dispatch(f({resource:"add-kb-node",accountId:d,workspace:a,parentId:i.id}))},N=t=>{const{value:o}=t.target;if(o==="add"){P();return}const j=m.find(g=>g.id===o)||i;C(j.id)},T=()=>{r!=null&&r.id&&(x.current=r.type==="folder",l.dispatch(J(_,d,E,"msgResponse",{items:[r].map(({id:t})=>({id:t}))})).then(()=>S()).then(()=>{h(null),ie()}).catch(t=>{k(()=>import("./sentryUtil.CEsrFXuJ.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(o=>o.reportError(t)),oe()}))};return e.jsxs(Y,{children:[e.jsx(U,{headline:b,subheadline:"Use canned responses are message templates you reuse during live chat."}),e.jsxs(de,{label:`${u("Category")}:`,children:[e.jsx(le,{options:[{label:`(${u("No Category")})`,value:y(a).id},...m.map(t=>({label:t.title,value:t.id})),{label:`+ ${u("Add New Category")}`,value:"add"}],value:s.id,onChange:N}),s.id!==i.id&&e.jsx(p,{icon:e.jsx("i",{className:W}),intent:"primary",style:{marginLeft:10},onClick:()=>l.dispatch(f({resource:"edit-node",accountId:d,workspace:a,id:s.id,title:s.title})),minimal:!0,children:e.jsx(n,{children:"Edit"})}),s.id!==i.id&&e.jsx(p,{icon:e.jsx("i",{className:z}),intent:"danger",style:{marginLeft:10},onClick:()=>h(s),minimal:!0,children:e.jsx(n,{children:"Delete"})})]}),e.jsx(G,{children:e.jsx(K,{xs:12,sm:12,md:10,lg:10,children:e.jsx(ee,{style:{padding:0},children:e.jsxs(me,{className:te,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{width:200},children:e.jsx(n,{children:"Shortcut"})}),e.jsx("th",{children:e.jsx(n,{children:"Response"})}),e.jsx("th",{style:{width:100}})]})}),e.jsxs("tbody",{children:[R.map(t=>{var o;return e.jsxs("tr",{children:[e.jsx("td",{children:`#${t.title}`}),e.jsx("td",{children:(((o=t==null?void 0:t.msgResponse)==null?void 0:o.text)||"").split(`
3`).reduce((j,g,I)=>[j,e.jsx("br",{},I),g])}),e.jsxs("td",{style:{padding:0,verticalAlign:"middle"},children:[e.jsx(p,{intent:"primary",onClick:()=>
3l.dispatch(f({resource:"edit-node",accountId:d,...t,workspace:a})),minimal:!0,children:e.jsx("i",{className:Q})})," ",e.jsx(p,{onClick:()=>h(t),intent:"danger",minimal:!0,children:e.jsx("i",{className:X})})]})]},t.id)}),R.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,children:e.jsx(re,{style:{margin:0},children:e.jsx(n,{substitutes:[s.title],children:"No canned responses under {0}"})})})}),e.jsx("tr",{children:e.jsx("td",{colSpan:3,children:e.jsx(p,{intent:"success",icon:e.jsx("i",{className:Z}),onClick:()=>l.dispatch(f({resource:"add-kb-node",accountId:d,workspace:a,parentId:s.id,type:D,title:"Response Shortcut"})),children:e.jsx(n,{children:"Add Response"})})})})]})]})})})}),e.jsxs(V,{deleteDialog:!!(r!=null&&r.id),onClose:()=>h(null),onDelete:T,children:[e.jsx($,{first:!0,light:!0,children:e.jsx(n,{children:"Confirm"})}),e.jsx("p",{children:ae(u("Are you sure you want to delete {0}?"),(r==null?void 0:r.title)||"")})]}),e.jsx(se,{}),e.jsx(ne,{})]})}export{at as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.