forked from NuQloud/nc-talk-ai
Talk AI is a multi-bot AI assistant manager for Nextcloud Talk: per-bot prompts and models, agentic tool calling (MCP + built-in tools), RAG over Nextcloud files, room-document search, vision and speech-to-text attachments, persistent bot wikis, approval workflows, rate limiting, and multi-provider LLM support (any OpenAI-compatible endpoint). Developed within EDUC - the European Digital UniverCity (https://educalliance.eu), where it runs as the 'EDUC AI' assistant on the alliance-wide Nextcloud portal. This public repository is the upstream point of truth; deployment-specific tools plug in via the tool-provider extension point (docs/TOOL_PROVIDERS.md). License: AGPL-3.0-or-later.
3 lines
3.1 KiB
JavaScript
3 lines
3.1 KiB
JavaScript
import{c as v,a as l}from"./branding-cqWE0Otc.chunk.mjs";const A=()=>{if(typeof window>"u")return;const t=window.OC||(window.OC={});if(typeof t.filePath=="function")return;const e=n=>n.replace(/^\/+|\/+$/g,""),o=n=>n.startsWith("/")?n:`/${n}`,r=()=>{if(typeof t.webroot=="string"&&t.webroot.length>0)return t.webroot;const n=typeof document<"u"?document.querySelector('meta[name="oc:webroot"]'):null;return n&&typeof n.content=="string"?n.content:""},i=(...n)=>{const c=n.filter(a=>typeof a=="string"&&a.length>0);if(c.length===0)return"";const[u,...p]=c,f=[u.replace(/\/+$/g,""),...p.map(a=>e(a))].filter(Boolean).join("/");return f.length>0?o(f):f};t.filePath=(n,c,u)=>{if(!n)return u||"";const p=r();return i(p,"apps",n,c,u)}};A();const w="educai",g="/apps/educai";let s=null,d=null,m=!1;async function U(){try{const t=await v.get(l.generateUrl("/apps/educai/api/v1/settings"));S(t.data)}catch{}}function S(t={},e={}){const o=O(t);y(o),e.refreshNavigation&&P().finally(()=>{y(o)})}function O(t){const e=t?.app_icon_runtime_urls||{};return{black:h(e.black)||b(t,"black")||l.imagePath(w,"app-dark.svg"),white:h(e.white)||b(t,"white")||l.imagePath(w,"app.svg")}}function b(t,e){if((t?.app_icon_mode==="custom"||t?.app_icon_url?"custom":"default")!="custom")return"";const o=String(t?.[e==="white"?"app_icon_white_url":"app_icon_black_url"]||t?.app_icon_url||"").trim();return/^educai-upload:\/\/(black|white)$/i.test(o)?l.generateUrl(`/apps/educai/api/v1/app-icon/${e}`):h(o)}function h(t){const e=String(t||"").trim();if(!e)return"";if(/^https?:\/\//i.test(e))try{const o=new URL(e);return o.protocol==="http:"||o.protocol==="https:"?e:""}catch{return""}return e.startsWith("/")&&!e.startsWith("//")?e:""}function y(t){s=t,k(t.white||t.black),$(t.black||t.white),q()}function k(t){if(!t||typeof document>"u")return;const e=document.querySelectorAll(`a[href*="${g}"]`);for(const o of e)if((o.getAttribute("href")||"").includes(g))for(const r of o.querySelectorAll("img"))r.getAttribute("src")!==t&&r.setAttribute("src",t)}function $(t){!t||typeof document>"u"||!E()||(_("favicon","icon",t,{type:"image/svg+xml"}),_("mask","mask-icon",t,{color:getComputedStyle(document.documentElement).getPropertyValue("--color-primary-element").trim()||"#000000"}))}function _(t,e,o,r={}){let i=document.head.querySelector(`link[data-educai-runtime-icon="${t}"]`);i||(i=document.createElement("link"),i.setAttribute("data-educai-runtime-icon",t),document.head.appendChild(i)),i.setAttribute("rel",e),i.setAttribute("href",o);for(const[n,c]of Object.entries(r))i.setAttribute(n,c)}function q(){d||typeof MutationObserver>"u"||!document.body||(d=new MutationObserver(C),d.observe(document.body,{childList:!0,subtree:!0}))}function C(){m||!s||(m=!0,window.requestAnimationFrame(()=>{m=!1,k(s.white||s.black)}))}async function P(){if(typeof window>"u")return;const t=window.OC?.Settings?.rebuildNavigation;typeof t=="function"&&await t()}function E(){if(typeof window>"u")return!1;const t=window.location.pathname;return t.includes("/apps/educai")||t.includes("/settings/user/educai")||t.includes("/settings/admin/educai")}export{S as a,U as s};
|
|
//# sourceMappingURL=appIconRuntime-ltIyK5iP.chunk.mjs.map
|