1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b3e3d4c0-eee8-4a46-a4fc-e035b1d34846",e._sentryDebugIdIdentifier="sentry-dbid-b3e3d4c0-eee8-4a46-a4fc-e035b1d34846")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5738],{88900:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/agent/review/inconsistencies",function(){return t(70890)}])},52639:function(e,n,t){"use strict";var s=t(85893),r=t(35129),a=t(30381),l=t.n(a);n.Z=e=>{let{datetime:n}=e,t=new(l())(n);return t.isValid()?(0,s.jsx)(r.Z,{date:t.valueOf(),locale:"en-US"}):(0,s.jsx)(s.Fragment,{})}},48740:function(e,n,t){"use strict";t.d(n,{j:function(){return d}});var s=t(67294),r=t(11163),a=t(6388),l=t(27361),i=t.n(l),o=t(19598);function d(){let{skip:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,r.useRouter)(),{data:t,loading:l}=(0,a.aM)(o.v,{fetchPolicy:"cache-and-network",skip:e}),d=i()(t,"botConfig"),c=!!(null==d?void 0:d.botOnboardedAt);return(0,s.useEffect)(()=>{!e&&!l&&!c&&("/agent"===n.pathname||n.pathname.startsWith("/agent/"))&&"/agent/onboarding"!==n.pathname&&n.replace("/agent/onboarding")},[e,l,c,n]),{loading:l,onboarded:c,config:d}}},36823:function(e,n,t){"use strict";t.d(n,{a:function(){return a}});var s=t(67294),r=t(2716);let a=()=>{(0,s.useEffect)(()=>{r.w.push({event:"page_view"})},[])}},68112:function(e,n,t){"use strict";t.d(n,{E:function(){return x}});var s=t(85893);t(67294);var r=t(41664),a=t.n(r),l=t(11163),i=t(40119),o=t(85169),d=t(48740);let c=[{label:"Overview",href:"/agent"},{label:"Brain",href:"/agent/brain"},{label:"Knowledge",href:"/agent/knowledge"},{label:"Documents",href:"/agent/documents"},{label:"Review",href:"/agent/review/candidates"},{label:"Activity",href:"/agent/responses"},{label:"Settings",href:"/agent/settings"}],u=()=>{let{pathname:e}=(0,l.useRouter)(),n=n=>"/agent"===n?"/agent"===e:e.startsWith(n);return(0,s.jsx)("div",{className:"border-b border-neutral-200",children:(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6",children:(0,s.jsx)("nav",{className:"flex gap-0.5 overflow-x-auto -mb-px",children:c.map(e=>(0,s.jsx)(a(),{href:e.href,className:(0,i.cn)("shrink-0 px-3 py-2.5 text-sm font-medium border-b-2 transition-colors no-underline whitespace-nowrap",n(e.href)?"border-neutral-900 text-neutral-900 dark:border-neutral-100 dark:text-neutral-100":"border-transparent text-neutral-500 hover:text-neutral-700 hover:border-neutral-300"),children:e.label},e.href))})})})},x=e=>{let{children:n}=e,{loading:t,onboarded:r}=(0,d.j)();return(0,s.jsx)(o.A,{children:t||!r?(0,s.jsx)("div",{className:"p-12",children:(0,s.jsx)("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-neutral-300 border-t-neutral-900"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u,{}),n]})})}},19598:function(e,n,t){"use strict";t.d(n,{v:function(){return a}});var s=t(82729);function r(){let e=(0,s._)(["\n query {\n botConfig {\n __typename\n mode\n autoMinConfidence\n retrievalMinScore\n tone\n styleKeywords\n signature\n customPrompt\n languageDefault\n onUnknown\n unknownReplyText\n suggestWhenHumanAssigned\n escalationTeamId\n autoPromoteMinConfidence\n autoPromoteMinOccurrence\n autoModeRequiresVerifiedTier\n historyMaxTurns\n historyTokenBudget\n autoCloseShortMessages\n llmPreset\n timezone\n botOnboardedAt\n historyConsentAt\n historyConsentBy\n createdAt\n updatedAt\n }\n }\n"]);return r=function(){return e},e}let a=(0,t(75063).Ps)(r())},70890:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return E}});var s=t(85893),r=t(67294),a=t(27361),l=t.n(a),i=t(6388),o=t(50319),d=t(40119),c=t(66308),u=t(36823),x=t(68112),m=t(45697),p=t.n(m),b=t(82690),f=t(52639);let h={VERIFIED:"bg-green-100 text-green-700",SYNCED:"bg-blue-100 text-blue-700",DERIVED:"bg-amber-100 text-amber-700",SUGGESTED:"bg-neutral-100 text-neutral-700"},g=e=>{var n,t,r,a;let{item:l,onResolve:i,resolving:o}=e,c=l.kbEntry,u=null!==(n=null==c?void 0:c.tier)&&void 0!==n?n:"UNKNOWN",x=null!=l.similarityScore?"".concat(Math.round(100*l.similarityScore),"% match"):"";return(0,s.jsx)("div",{className:"rounded-lg border border-neutral-200 bg-white shadow-sm",children:(0,s.jsx)("div",{className:"p-6",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("span",{className:(0,d.cn)("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",null!==(t=h[u])&&void 0!==t?t:"bg-neutral-100 text-neutral-700"),children:u}),(null==c?void 0:c.language)&&(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-neutral-300 px-2.5 py-0.5 text-xs font-medium text-neutral-700",children:c.language.toUpperCase()}),x&&(0,s.jsx)("span",{className:"text-xs text-neutral-500",children:x}),(0,s.jsx)("div",{className:"flex-grow"}),(0,s.jsxs)("span",{className:"text-xs text-neutral-500",children:["detected ",(0,s.jsx)(f.Z,{date:l.detectedAt})]})]}),(0,s.jsx)("p",{className:"text-base font-semibold text-neutral-900",children:null!==(r=null==c?void 0:c.questionCanonical)&&void 0!==r?r:"(KB entry missing)"}),(0,s.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wider text-green-600",children:["Current (",u,")"]}),(0,s.jsx)("p",{className:"text-sm whitespace-pre-wrap mt-1",children:null!==(a=null==c?void 0:c.answer)&&void 0!==a?a:"â"})]}),(0,s.jsx)("div",{className:"hidden md:block border-l border-neutral-200"}),(0,s.jsx)("div",{className:"block md:hidden border-t border-neutral-200"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-amber-600",children:"Conflicting (extracted)"}),(0,s.jsx)("p",{className:"text-sm whitespace-pre-wrap mt-1",children:l.conflictingAnswer})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,s.jsx)("button",{className:"px-3 py-1.5 text-xs font-medium text-neutral-700 hover:bg-neutral-100 rounded-lg transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:o,onClick:()=>i(l,"DISMISSED"),children:"Dismiss (false positive)"}),(0,s.jsx)("button",{className:"rounded-lg border border-neutral-300 px-3 py-1.5 text-xs font-medium text-neutral-700 hover:bg-neutral-50 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:o,onClick:()=>i(l,"KB_UPDATED"),children:"Update KB"}),(0,s.jsx)("button",{className:"rounded-lg bg-green-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-green-700 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:o,onClick:()=>i(l,"KB_CORRECT"),children:"Keep current"})]})]})})})};g.propTypes={item:p().object.isRequired,onResolve:p().func.isRequired,resolving:p().bool};let v=e=>{let{items:n=[],loading:t,resolvingId:r,onResolve:a,onLoadMore:l,hasMore:i}=e;return t&&0===n.length?(0,s.jsx)("div",{className:"p-8",children:(0,s.jsx)(b.Z,{})}):t||0!==n.length?(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[n.map(e=>(0,s.jsx)(g,{item:e,onResolve:a,resolving:r===e.id},e.id)),i&&(0,s.jsx)("div",{className:"text-center py-4",children:(0,s.jsx)("button",{className:"px-3 py-1.5 text-sm font-medium text-neutral-700 hover:bg-neutral-100 rounded-lg transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:l,disabled:t,children:t?"Loadingâ¦":"Load more"})})]}):(0,s.jsx)("div",{className:"rounded-lg border border-neutral-200 bg-white shadow-sm",children:(0,s.jsx)("div",{className:"p-6",children:(0,s.jsx)("p",{className:"text-center text-neutral-500",children:"No pending inconsistencies. Run the detector to surface conflicts between extracted knowledge and your published content."})})})};v.propTypes={items:p().array,loading:p().bool,resolvingId:p().string,onResolve:p().func.isRequired,onLoadMore:p().func,hasMore:p().bool};var w=t(82729),N=t(75063);function y(){let e=(0,w._)(["\n query($pagination: CursorPaginationInput, $filter: KBInconsistencyFilter) {\n kbInconsistencies(pagination: $pagination, filter: $filter) {\n nodes {\n __typename\n id\n conflictingAnswer\n similarityScore\n status\n resolutionNote\n detectedAt\n resolvedAt\n kbEntry {\n id\n questionCanonical\n answer\n tier\n language\n status\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n"]);return y=function(){return e},e}let j=(0,N.Ps)(y());function k(){let e=(0,w._)(["\n mutation($input: ResolveKBInconsistencyInput!) {\n resolveKBInconsistency(input: $input) {\n kbInconsistency {\n __typename\n id\n status\n resolutionNote\n resolvedAt\n }\n }\n }\n"]);return k=function(){return e},e}let I=(0,N.Ps)(k()),_=[{value:"PENDING",label:"Pending"},{value:"RESOLVED_KB_CORRECT",label:"Kept current"},{value:"RESOLVED_KB_UPDATED",label:"Updated"}
1,{value:"DISMISSED",label:"Dismissed"}],C=()=>{(0,u.a)();let[e,n]=(0,r.useState)("PENDING"),[t,a]=(0,r.useState)(null),{data:x,loading:m,refetch:p,fetchMore:b}=(0,i.aM)(j,{variables:{pagination:{first:25},filter:{status:e}},fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first"}),f=l()(x,"kbInconsistencies.nodes",[]),h=l()(x,"kbInconsistencies.pageInfo",{endCursor:null,hasNextPage:!1}),[g]=(0,o.D)(I),w=(0,r.useCallback)(async(e,n)=>{a(e.id);try{await g({variables:{input:{id:e.id,resolution:n}}}),await p()}finally{a(null)}},[g,p]),N=(0,r.useCallback)(()=>{h.hasNextPage&&b({variables:{pagination:{first:25,after:h.endCursor},filter:{status:e}},updateQuery:(e,n)=>{let{fetchMoreResult:t}=n;return t?{kbInconsistencies:{...t.kbInconsistencies,nodes:[...e.kbInconsistencies.nodes,...t.kbInconsistencies.nodes]}}:e}})},[b,h,e]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.p,{title:"Knowledge inconsistencies"}),(0,s.jsx)("main",{className:"flex-grow py-6",children:(0,s.jsx)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-neutral-900",children:"Knowledge inconsistencies"}),(0,s.jsx)("p",{className:"text-sm text-neutral-500",children:"Conflicts the detector found between extracted knowledge and your published content. Pick a resolution to keep the canonical answer, update it with the new info, or dismiss the flag if it's a false positive."})]}),(0,s.jsx)("div",{className:"flex items-center gap-1 border-b border-neutral-200 overflow-x-auto",children:_.map(t=>(0,s.jsx)("button",{onClick:()=>n(t.value),className:(0,d.cn)("px-4 py-2 text-sm font-medium whitespace-nowrap transition-colors cursor-pointer",e===t.value?"border-b-2 border-neutral-900 text-neutral-900":"text-neutral-500 hover:text-neutral-700"),children:t.label},t.value))}),(0,s.jsx)(v,{items:f,loading:m,resolvingId:t,onResolve:w,onLoadMore:N,hasMore:h.hasNextPage})]})})})]})};C.getLayout=e=>(0,s.jsx)(x.E,{children:e});var E=C}},function(e){e.O(0,[6837,5129,5169,2888,9774,179],function(){return e(e.s=88900)}),_N_E=e.O()}]);
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.