feat: port the client to MyGo native UI (0.3.0)
Switch from Asuka to MyGo, keeping the API client and the feature set: - servers: saved servers, passwordless and password login, proxy, self-signed certificates, per-server device tokens (Keystore), connect form, instance list sheet with switch/disconnect - sessions: virtualized list, search, new session, rename/archive/delete, running indicator, event stream keeps it live - chat: pushed window with system back bar, streaming Markdown via ui/markdown, reasoning and tool rows with image previews, footer menu (read aloud via a Kotlin TTS plugin, copy, fork), user message menu (copy, revert, fork), context usage ring and detail sheet, attachments (photos/files via the document picker), permissions - release builds allow plain http:// LAN servers (Go's net/http dials directly, no cleartext manifest needed) - a local fork of MyGo (third_party/mygo) lowers the Android host's minSdk to 24 (Android 7.0); Go 1.27.4 via mise Version 0.3.0.
This commit is contained in:
1 parent
2fb4a8ea79
commit
6c0ee61750
2538 files changed
+675779
-4792
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
// Code generated by `bun run build` from packages/bridge. DO NOT EDIT.
|
||||
(()=>{var ae=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function V(e,t){let n={},o=e?.closest("input,textarea")??null,s=o&&!(o.type&&ae.has(o.type.toLowerCase()));if(s&&!o.readOnly&&!o.disabled)n.e=!0;else if(e?.isContentEditable)n.e=!0;if(s&&o.type?.toLowerCase()!=="password"){let c=o.selectionStart??0,b=o.selectionEnd??0;if(b>c)t=(o.value??"").slice(c,b)}else if(s)t="";if(t)n.s=t;if(!e)return n;let a=e.closest("a[href],area[href]");if(a){let c=typeof a.href==="string"?a.href:a.href?.baseVal??"";if(c)n.l=c;let b=(a.innerText??a.textContent??"").trim();if(b)n.lt=b}let u=e.closest("img");if(u){let c=u.currentSrc||u.src;if(c)n.i=c}let m=e.closest("video,audio");if(m){let c=m.currentSrc||m.src;if(c)n.m=c}return n}var C=null,N=null,W=()=>typeof CSS<"u"&&("highlights"in CSS)&&typeof Highlight<"u";function ce(e,t){let n=[];if(!e||!document.body)return n;let o=t?e:e.toLowerCase(),s=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode(a){let u=a.parentElement;if(!u||/^(SCRIPT|STYLE|NOSCRIPT|TEMPLATE|TEXTAREA)$/.test(u.tagName))return NodeFilter.FILTER_REJECT;return u.getClientRects().length?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});for(let a=s.nextNode();a;a=s.nextNode()){let u=t?a.nodeValue:a.nodeValue.toLowerCase();for(let m=u.indexOf(o);m>=0;m=u.indexOf(o,m+o.length)){let c=document.createRange();c.setStart(a,m),c.setEnd(a,m+o.length),n.push(c)}}return n}function de(){if(N||!("adoptedStyleSheets"in document))return;N=new CSSStyleSheet,N.replaceSync("::highlight(mygo-find){background-color:#fdeb62;color:#000}::highlight(mygo-find-active){background-color:#ff9632;color:#000}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,N]}function q(e,t={}){let n=!!t.matchCase;if(!t.next||!C||C.text!==e||C.matchCase!==n)C={text:e,matchCase:n,ranges:ce(e,n),active:-1};let o=C.ranges.length;if(o===0)return H(),{matches:0,active:0};C.active=C.active<0?t.backward?o-1:0:(C.active+(t.backward?o-1:1))%o;let s=C.ranges[C.active];if(W())de(),CSS.highlights.set("mygo-find",new Highlight(...C.ranges)),CSS.highlights.set("mygo-find-active",new Highlight(s));else{let a=getSelection();a?.removeAllRanges(),a?.addRange(s)}return s.startContainer.parentElement?.scrollIntoView({block:"center",inline:"nearest"}),{matches:o,active:C.active+1}}function H(){if(C&&!W())getSelection()?.removeAllRanges();if(C=null,W())CSS.highlights.delete("mygo-find"),CSS.highlights.delete("mygo-find-active")}function ue(e,t){let n=["width:max-content"];if(e.minWidth>0)n.push(`min-width:${Math.max(e.minWidth-t,0)}px`);if(e.maxWidth>0)n.push(`max-width:${Math.max(e.maxWidth-t,0)}px`);if(e.minHeight>0)n.push(`min-height:${e.minHeight}px`);return`:where(:root){${n.join(";")}}`}function B(e){let t=null;return(n)=>{if(t&&t.w===n.w&&t.h===n.h&&t.sw===n.sw&&t.sh===n.sh)return;t=n,e(n)}}function J(e,t,n){let o=B(n),s=0,a=!1,u=!1,m=()=>t(ue(e,s)),c=(b)=>{let p=document.documentElement;if(!p)return;let h=document.scrollingElement??p,y=Math.max(innerWidth-h.clientWidth,0),O=Math.max(innerHeight-h.clientHeight,0),x=p.getBoundingClientRect(),r=e.maxHeight>0&&x.height>e.maxHeight?y:0;if(r!==s){if(s=r,!b)m(),x=p.getBoundingClientRect();else if(!u)u=!0,requestAnimationFrame(()=>{u=!1,m()})}let S=document.body,E=!!S&&S.scrollWidth>S.clientWidth;o({w:x.width,h:x.height,sw:y,sh:E?O:0})};return m(),{start(){if(a)return;if(a=!0,c(!1),typeof ResizeObserver<"u"&&document.documentElement)new ResizeObserver(()=>c(!0)).observe(document.documentElement);addEventListener("resize",()=>c(!1))},setLimits(b){if(e=b,m(),a)c(!1)},again(){if(o=B(n),a)c(!1)}}}var j=(e)=>setTimeout(()=>{throw e});function Y(e){if(e.reason!==void 0)return e.reason;return Error("mygo: the call was aborted")}class D extends Error{method;constructor(e,t){super(t);this.method=e;this.name="CallError"}}function X(e,t){let n=Math.random().toString(36).slice(2)+Date.now().toString(36),o=new Map,s=new Map,a={accent:null,reduceMotion:!1,reduceTransparency:!1,highContrast:!1,textScale:1},u=0,m=new Map,c=new WeakMap,b=0,p=e.locale||"en",h=e.dir==="rtl"?"rtl":"ltr",y=!0,O=(f)=>t(JSON.stringify(f)),x=(f,...i)=>S(f,i),r=(f,i,l)=>{let d=l?.signal;if(!d)return S(f,i);if(d.aborted)return Promise.reject(Y(d));return S(f,i,d)},S=(f,i,l)=>{let d=++u;return new Promise((L,A)=>{let M;for(let w of i){let v=typeof w==="object"&&w!==null?c.get(w):void 0;if(!v)continue;if(v.id||v.closed){M?.forEach((g)=>{m.delete(g.id),g.id=0}),A(Error("mygo: a channel can be passed to one call, before it is closed"));return}v.id=++b,m.set(v.id,v),(M??=[]).push(v)}let k,P;if(l)k=()=>{o.delete(d),M?.forEach((w)=>{m.delete(w.id),w.id=0});try{O({t:"cancel",id:d,k:n})}catch{}A(Y(l))},l.addEventListener("abort",k,{once:!0}),P=()=>l.removeEventListener("abort",k);o.set(d,{method:f,resolve:L,reject:A,channels:M,done:P});try{O({t:"call",id:d,k:n,m:f,a:i,cancel:l?!0:void 0})}catch(w){if(o.delete(d),k)l?.removeEventListener("abort",k);M?.forEach((v)=>{m.delete(v.id),v.id=0}),A(Line truncated
|
||||
Reference in new issue
Block a user