graphdb-workbench
Version: 
The web application for GraphDB APIs
2 lines • 3.61 kB
JavaScript
export const __webpack_id__=51087;export const __webpack_ids__=[51087];export const __webpack_modules__={51087:()=>{const e="guide.step-action.ask-ttyg-agent",t="chat-details";PluginRegistry.add("guide.step",[{guideBlockName:"ttyg-ask-question",getSteps:(o,i)=>{const l=i.GuideUtils;return[{guideBlockName:"input-element",options:{content:"guide.step_plugin.ask-ttyg-agent.input-question",...o.mainAction?{}:{title:e},class:"input-question",disableNextFlow:!0,...o,url:"ttyg",elementSelector:l.getGuideElementSelector("question-input"),show:e=>()=>{const n=l.getGuideElementSelector("contenteditable");$(n).on("keydown",o=>{!$(n).text()||"Enter"!==o.key||o.shiftKey||o.ctrlKey||l.waitFor(l.getGuideElementSelector(t)).then(()=>e.next())})},hide:()=>()=>{const e=l.getGuideElementSelector("contenteditable");$(e).off("keydown")}}},n(l,o)]}},{guideBlockName:"ttyg-explain-response",getSteps:(t,o)=>{const i=o.GuideUtils,l=i.getLastGuideElementSelector("explain-response-btn"),s=i.getLastGuideElementSelector("chat-item",l);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>i.waitFor(s,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+3))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explain-answer",...t.mainAction?{}:{title:e},class:"explain-answer",disableNextFlow:!0,...t,url:"ttyg",elementSelector:s}},n(i,t)]}},{guideBlockName:"ttyg-ask-agent-explore-sparql",getSteps:(t,n)=>{const o=n.GuideUtils,i=o.getLastGuideElementSelector("open-in-sparql-editor-btn"),l=o.getLastGuideElementSelector("chat-item",i);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>o.waitFor(l,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+2))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explore-sparql",class:"explore-sparql",...t.mainAction?{}:{title:e},disableNextFlow:!0,...t,url:"ttyg",elementSelector:l}}]}},{guideBlockName:"ttyg-ask-explain-answer-more",getSteps:(t,o)=>{const i=o.GuideUtils,l=i.getLastGuideElementSelector("how-derive-answer-btn"),s=i.getLastGuideElementSelector("chat-item",l);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>i.waitFor(s,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+3))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explain-answer-more",class:"input-agent-name",...t.mainAction?{}:{title:e},disableNextFlow:!0,...t,url:"ttyg",elementSelector:s,show:e=>()=>{$(s).on("click",()=>{e.next()})},hide:()=>()=>{$(s).off("click")}}},n(i,t)]}},{guideBlockName:"ask-ttyg-agent",getSteps:e=>{e.mainAction="ask-ttyg-agent",e.maxWaitTime=10,e.forceReload=!1;const t=e.explain,n=e.explainMore,o=e.exploreSparql,i=[{guideBlockName:"ttyg-ask-question",options:{...e,skipPoint:!0}}];return t&&i.push({guideBlockName:"ttyg-explain-response",options:{...e}}),t&&o&&i.push({guideBlockName:"ttyg-ask-agent-explore-sparql",options:{...e}}),t&&n&&i.push({guideBlockName:"ttyg-ask-explain-answer-more",options:{...e}}),i}}]);const n=(e,n)=>({guideBlockName:"hold-and-wait-until-hidden",options:angular.extend({},{content:"guide.step_plugin.ask-ttyg-agent.wait-for-answer",class:"wait-for-answer",url:"ttyg",elementSelector:e.getGuideElementSelector(t),elementSelectorToWait:e.getGuideElementSelector("question-loader")},n)})}};
//# sourceMappingURL=51087.1e118e7fe32a8c09d6cb.bundle.js.map