@chainingintention/pi-web-cn 2.202610.1 → 2.202610.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/CommandPicker-gK2biReF.js +70 -0
- package/dist/client/assets/PiWebApp-DccVSAFd.js +3761 -0
- package/dist/client/assets/SettingsDialog-vGDo1-BJ.js +1015 -0
- package/dist/client/assets/index-Chn9pQPv.js +2 -0
- package/dist/client/assets/managementEmbed-Bx8Mwzdw.js +2 -0
- package/dist/client/assets/preload-helper-XpATwJ5c.js +1 -0
- package/dist/client/index.html +3 -2
- package/dist/pi-web-plugins/custom-ui-codex/LICENSE-icons +35 -0
- package/dist/pi-web-plugins/custom-ui-codex/README.md +25 -0
- package/dist/pi-web-plugins/custom-ui-codex/chat-settings.css +251 -0
- package/dist/pi-web-plugins/custom-ui-codex/codex.css +77 -0
- package/dist/{client/assets/graphite-DquaqFXU.css → pi-web-plugins/custom-ui-codex/graphite.css} +4 -2
- package/dist/pi-web-plugins/custom-ui-codex/package.json +10 -0
- package/dist/{client/assets/paper-CB1oLuRr.css → pi-web-plugins/custom-ui-codex/paper.css} +7 -5
- package/dist/pi-web-plugins/custom-ui-codex/pi-web-plugin.js +56 -0
- package/dist/pi-web-plugins/files/browser/pi-web-plugin.js +29 -29
- package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +3 -3
- package/dist/pi-web-plugins/zh-cn/components.json +6 -1
- package/dist/plugin-api.d.ts +48 -0
- package/dist/server/terminals/requiredTerminalService.js +2 -53
- package/dist/server/terminals/requiredTerminalService.js.map +1 -1
- package/dist/shared/terminalCommandRun.js +56 -0
- package/dist/shared/terminalCommandRun.js.map +1 -0
- package/docs/config.md +6 -2
- package/docs/plugins.md +22 -1
- package/package.json +2 -2
- package/dist/client/assets/PiWebApp-vueV4eKR.js +0 -4938
- package/dist/client/assets/external-B9K8duyP.js +0 -2
- package/dist/client/assets/index-C8f0d0CR.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PiWebApp-DccVSAFd.js","./CommandPicker-gK2biReF.js","./managementEmbed-Bx8Mwzdw.js","./preload-helper-XpATwJ5c.js","./vendor-editor-core-BfnHL1Dg.js","./vendor-editor-languages-bNquDJP0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{I as e,J as t,L as n,R as r,V as i,X as a}from"./managementEmbed-Bx8Mwzdw.js";import{n as o,t as s}from"./preload-helper-XpATwJ5c.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function c(e=async()=>(await o(`pi-web-plugins/localization.json`,{shouldLoadPlugin:e=>e.id===`zh-cn`})).registrations){n(`en`,{});try{let i=(await e()).find(e=>e.id===`zh-cn`&&e.machineId===void 0);if(i!==void 0){let e=new AbortController,o=(await i.plugin.activate({apiVersion:4,pluginId:i.id,runtimePluginId:i.id,html:t,svg:a,translate:r,signal:e.signal,lifetimeSignal:e.signal})).contributions.localizations?.find(e=>e.locale===`zh-CN`);o!==void 0&&n(o.locale,o.messages)}}catch(e){console.warn(`Could not initialize UI localization; using English`,e)}}function l(t){t.documentElement.lang=e();let n=t.querySelector(`meta[name="description"]`);n!==null&&(n.content=r(`app.description`,`Remote web UI and browser control plane for persistent Pi Coding Agent sessions.`));let a=t.querySelector(`link[rel="manifest"]`);a!==null&&(a.href=i(e()===`zh-CN`?`pi-web-plugins/zh-cn/manifest.webmanifest`:`manifest.webmanifest`))}await c(),l(document),await s(()=>import(`./PiWebApp-DccVSAFd.js`),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=globalThis,t=e.ShadowRoot&&(e.ShadyCSS===void 0||e.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap,i=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,n=this.t;if(t&&e===void 0){let t=n!==void 0&&n.length===1;t&&(e=r.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&r.set(n,e))}return e}toString(){return this.cssText}},a=e=>new i(typeof e==`string`?e:e+``,void 0,n),o=(e,...t)=>new i(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,n),s=(n,r)=>{if(t)n.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let t of r){let r=document.createElement(`style`),i=e.litNonce;i!==void 0&&r.setAttribute(`nonce`,i),r.textContent=t.cssText,n.appendChild(r)}},c=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return a(t)})(e):e,{is:l,defineProperty:u,getOwnPropertyDescriptor:d,getOwnPropertyNames:ee,getOwnPropertySymbols:te,getPrototypeOf:ne}=Object,f=globalThis,re=f.trustedTypes,ie=re?re.emptyScript:``,ae=f.reactiveElementPolyfillSupport,p=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?ie:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},h=(e,t)=>!l(e,t),oe={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:h};Symbol.metadata??=Symbol(`metadata`),f.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=oe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&u(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??oe}static _$Ei(){if(this.hasOwnProperty(p(`elementProperties`)))return;let e=ne(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(p(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(p(`properties`))){let e=this.properties,t=[...ee(e),...te(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(c(e))}else e!==void 0&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?m:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?m:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??h)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};g.elementStyles=[],g.shadowRootOptions={mode:`open`},g[p(`elementProperties`)]=new Map,g[p(`finalized`)]=new Map,ae?.({ReactiveElement:g}),(f.reactiveElementVersions??=[]).push(`2.1.2`);var _=globalThis,se=e=>e,v=_.trustedTypes,ce=v?v.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,y=`$lit$`,b=`lit$${Math.random().toFixed(9).slice(2)}$`,x=`?`+b,le=`<${x}>`,S=document,C=()=>S.createComment(``),w=e=>e===null||typeof e!=`object`&&typeof e!=`function`,T=Array.isArray,ue=e=>T(e)||typeof e?.[Symbol.iterator]==`function`,E=`[
|
|
2
|
+
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,de=/-->/g,fe=/>/g,O=RegExp(`>|${E}(?:([^\\s"'>=/]+)(${E}*=${E}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),pe=/'/g,me=/"/g,he=/^(?:script|style|textarea|title)$/i,k=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ge=k(1),_e=k(2),ve=k(3),A=Symbol.for(`lit-noChange`),j=Symbol.for(`lit-nothing`),ye=new WeakMap,M=S.createTreeWalker(S,129);function be(e,t){if(!T(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ce===void 0?t:ce.createHTML(t)}var xe=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=D;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===D?c[1]===`!--`?o=de:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=O):(he.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=O):o=fe:o===O?c[0]===`>`?(o=i??D,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?O:c[3]===`"`?me:pe):o===me||o===pe?o=O:o===de||o===fe?o=D:(o=O,i=void 0);let d=o===O&&e[t+1].startsWith(`/>`)?` `:``;a+=o===D?n+le:l>=0?(r.push(s),n.slice(0,l)+y+n.slice(l)+b+d):n+b+(l===-2?t:d)}return[be(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},N=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=xe(t,n);if(this.el=e.createElement(l,r),M.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=M.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(y)){let t=u[o++],n=i.getAttribute(e).split(b),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Ce:r[1]===`?`?we:r[1]===`@`?L:I}),i.removeAttribute(e)}else e.startsWith(b)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(he.test(i.tagName)){let e=i.textContent.split(b),t=e.length-1;if(t>0){i.textContent=v?v.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],C()),M.nextNode(),c.push({type:2,index:++a});i.append(e[t],C())}}}else if(i.nodeType===8){if(i.data===x)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(b,e+1))!==-1;)c.push({type:7,index:a}),e+=b.length-1}}a++}}static createElement(e,t){let n=S.createElement(`template`);return n.innerHTML=e,n}};function P(e,t,n=e,r){if(t===A)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=w(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=P(e,i._$AS(e,t.values),i,r)),t}var Se=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??S).importNode(t,!0);M.currentNode=r;let i=M.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new F(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new R(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=M.nextNode(),a++)}return M.currentNode=S,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},F=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),w(e)?e===j||e==null||e===``?(this._$AH!==j&&this._$AR(),this._$AH=j):e!==this._$AH&&e!==A&&this._(e):e._$litType$===void 0?e.nodeType===void 0?ue(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==j&&w(this._$AH)?this._$AA.nextSibling.data=e:this.T(S.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=N.createElement(be(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Se(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=ye.get(e.strings);return t===void 0&&ye.set(e.strings,t=new N(e)),t}k(t){T(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(C()),this.O(C()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=se(e).nextSibling;se(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},I=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=j,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=P(this,e,t,0),a=!w(e)||e!==this._$AH&&e!==A,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=P(this,r[n+o],t,o),s===A&&(s=this._$AH[o]),a||=!w(s)||s!==this._$AH[o],s===j?e=j:e!==j&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Ce=class extends I{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===j?void 0:e}},we=class extends I{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==j)}},L=class extends I{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=P(this,e,t,0)??j)===A)return;let n=this._$AH,r=e===j&&n!==j||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==j&&(n===j||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},R=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}},Te={M:y,P:b,A:x,C:1,L:xe,R:Se,D:ue,V:P,I:F,H:I,N:we,U:L,B:Ce,F:R},Ee=_.litHtmlPolyfillSupport;Ee?.(N,F),(_.litHtmlVersions??=[]).push(`3.3.3`);var z=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new F(t.insertBefore(C(),e),e,void 0,n??{})}return i._$AI(e),i},B=globalThis,V=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=z(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};V._$litElement$=!0,V.finalized=!0,B.litElementHydrateSupport?.({LitElement:V});var De=B.litElementPolyfillSupport;De?.({LitElement:V}),(B.litElementVersions??=[]).push(`4.2.2`);function Oe(e,t=Ae()){let n=new URL(t.viteBaseUrl,t.documentBaseUrl);return new URL(je(e),n).toString()}function ke(e,t=Ae()){let n=new URL(Oe(e,t));if(n.protocol===`http:`)n.protocol=`ws:`;else if(n.protocol===`https:`)n.protocol=`wss:`;else throw Error(`Cannot create a WebSocket URL from ${n.protocol}`);return n.toString()}function Ae(){return{viteBaseUrl:`./`,documentBaseUrl:typeof document>`u`?`http://localhost/`:document.baseURI}}function je(e){return e.startsWith(`/`)?`.${e}`:e}var Me=class extends Error{constructor(e,t,n){super(U(`en`,{})(e,t,n)),this.messageKey=e,this.fallback=t,this.parameters=n,this.name=`UserFacingError`}},Ne=/\{([a-zA-Z][a-zA-Z0-9_]*)\}/gu;function H(e){return[...new Set([...e.matchAll(Ne)].map(e=>e[1]??``))].sort()}function U(e,t){return(n,r,i={})=>{let a=e===`en`||!Object.hasOwn(t,n)?void 0:t[n];return(a!==void 0&&H(a).join(`,`)===H(r).join(`,`)?a:r).replace(Ne,(e,t)=>Object.hasOwn(i,t)?String(i[t]):e)}}function Pe(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Invalid translation catalog`);let t=[];for(let[n,r]of Object.entries(e)){if(n===``||typeof r!=`string`)throw Error(`Invalid translation catalog`);t.push([n,r])}return Object.fromEntries(t)}var Fe=U(`en`,{}),Ie=`en`,Le=(e,t,n)=>Fe(e,t,n);function Re(e,t){Fe=U(e,Pe(t)),Ie=e}function ze(){return Ie}var Be={sessionsDeleteArchived:`sessions.deleteArchived`,sessionsBulkMutations:`sessions.bulkMutations`,sessionsCleanup:`sessions.cleanup`,sessionsReload:`sessions.reload`,sessionsClearQueue:`sessions.clearQueue`,sessionsQueueMessageActions:`sessions.queueMessageActions`,sessionsPersistedState:`sessions.persistedState`,sessionsNotifications:`sessions.notifications`,sessionsUnread:`sessions.unread`,sessionsAskUser:`sessions.askUser`,promptAttachments:`prompt.attachments`,workspaceFileSuggestions:`workspace.fileSuggestions`,piPackagesManage:`piPackages.manage`,selectedMachineSettings:`settings.selectedMachine`,agentProfileConfig:`settings.agentProfile`,pluginLifecycle:`plugins.lifecycle`},Ve=1e3,He=32768,Ue=8192,We=`pi-web.ask.answers`,Ge=1e3,Ke=4e3,qe=1e3,Je=4e3,Ye=1e4,Xe=/^[a-z][a-z0-9.-]*$/u,Ze=new Set([`core`,`themes`]),Qe=`machine.`,$e=`pi-web`,et=`${$e}.`;function tt(e){return Xe.test(e)}function nt(e){return e===$e||e.startsWith(et)}function rt(e){return Ze.has(e)||e.startsWith(Qe)||nt(e)}var W=262144,it=8388608,at=266240,ot=8392704,st=266240,ct=65536,G=69632,lt=1048576,ut=1e4,dt=2048;Object.freeze([`/paired-plugin-backends/:pluginId/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/workspaces/:workspaceId/:operation`]),Object.freeze([`/paired-plugin-backends/:pluginId/channels/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/channels/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/workspaces/:workspaceId/channels/:operation`]);function ft(e){let t=e.scope,n=e.projectId,r=e.workspaceId;if(t===void 0&&n===void 0&&r===void 0)return{};if(t!==`machine`&&t!==`project`&&t!==`workspace`)throw Error(`Plugin backend scope must be machine, project, or workspace`);for(let e of[n,r])if(e!==void 0&&(typeof e!=`string`||e===``||e.length>512))throw Error(`Plugin backend scope ids must be non-empty strings of at most 512 characters`);if(t===`machine`&&(n!==void 0||r!==void 0))throw Error(`Machine scope cannot contain project or workspace ids`);if(t===`project`&&r!==void 0)throw Error(`Project scope cannot contain a workspace id`);return{scope:t,...typeof n==`string`?{projectId:n}:{},...typeof r==`string`?{workspaceId:r}:{}}}function pt(e,t){let n=e.workspaceId===void 0?e.projectId===void 0?`machine`:`project`:`workspace`;if(t===void 0)return n;if(n!==`workspace`&&t.scope===void 0)throw Error(`Scoped plugin backend calls require an explicit scope`);if(t.scope!==void 0&&t.scope!==n||t.projectId!==void 0&&t.projectId!==e.projectId||t.workspaceId!==void 0&&t.workspaceId!==e.workspaceId)throw Error(`Plugin backend wire scope does not match route authority`);return n}function mt(e,t=!1){let n=[``,`paired-plugin-backends`,encodeURIComponent(e.pluginId)];return e.projectId!==void 0&&n.push(`projects`,encodeURIComponent(e.projectId)),e.workspaceId!==void 0&&n.push(`workspaces`,encodeURIComponent(e.workspaceId)),t&&n.push(`channels`),n.push(encodeURIComponent(e.operation)),n.join(`/`)}var ht=/^[a-z][a-z0-9.-]*$/u,gt=/^[a-z][a-z0-9.-]*$/u,_t=64;function vt(e){return e.length<=128&&ht.test(e)}function yt(e){if(!vt(e))throw Error(`Plugin backend operation must match ${String(ht)} and be at most 128 characters`);return e}function bt(e){if(typeof e!=`string`||e===``||e.length>512)throw Error(`Plugin backend revision must be a non-empty string of at most 512 characters`);return e}function K(e,t,n=W){let r=Y(e,new Set,t,0);if(q(JSON.stringify(r))>n)throw Error(`${t} exceeds the ${String(n)} byte limit`);return r}function xt(e,t,n=W){if(q(e)>n)throw Error(`${t} exceeds the ${String(n)} byte limit`);let r;try{r=JSON.parse(e)}catch(e){throw Error(`${t} must be valid JSON`,{cause:e})}return K(r,t,n)}function St(e,t,n={}){return Et({version:1,kind:`open`,...ft({...n}),revision:bt(e),input:K(t,`Plugin backend channel open input`,W)},`Plugin backend channel open envelope`,st)}function Ct(e){return Et({version:1,kind:`data`,data:K(e,`Plugin backend channel data`,ct)},`Plugin backend channel data envelope`,G)}function wt(e){let t=Dt(e,`Plugin backend channel server frame`);if(kt(t),t.kind===`ready`)return J(e,G,`Plugin backend channel ready frame`),Object.freeze({version:1,kind:`ready`});if(t.kind===`data`)return Ot(t,e);if(t.kind===`error`)return J(e,G,`Plugin backend channel error frame`),Object.freeze({version:1,kind:`error`,code:At(t.code),message:jt(t.message)});throw Error(`Plugin backend channel server frame kind is invalid`)}function Tt(e){if(typeof e!=`string`)throw Error(`Plugin backend channel close reason must be a string`);if(q(e)>120)throw Error(`Plugin backend channel close reason exceeds the 120 byte limit`);return e}function q(e){return new TextEncoder().encode(e).byteLength}function Et(e,t,n){let r=JSON.stringify(e);return J(r,n,t),r}function Dt(e,t){J(e,st,t);let n;try{n=JSON.parse(e)}catch(e){throw Error(`${t} must be valid JSON`,{cause:e})}if(!Nt(n))throw Error(`${t} must be an object`);return n}function Ot(e,t){return J(t,G,`Plugin backend channel data frame`),Object.freeze({version:1,kind:`data`,data:K(e.data,`Plugin backend channel data`,ct)})}function kt(e){if(e.version!==1)throw Error(`Plugin backend channel frame version is unsupported`)}function At(e){if(typeof e!=`string`||e.length>64||!gt.test(e))throw Error(`Plugin backend channel error code is invalid`);return e}function jt(e){if(typeof e!=`string`||e===``)throw Error(`Plugin backend channel error message must be a non-empty string`);if(q(e)>2048)throw Error(`Plugin backend channel error message exceeds the ${String(dt)} byte limit`);return e}function J(e,t,n){if(q(e)>t)throw Error(`${n} exceeds the ${String(t)} byte limit`)}function Y(e,t,n,r){if(r>_t)throw Error(`${n} exceeds the maximum JSON depth of ${String(_t)}`);if(e===null||typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw Error(`${n} must contain only finite JSON numbers`);return e}if(Array.isArray(e)){if(t.has(e))throw Error(`${n} must not contain cycles`);t.add(e);let i=e.map(e=>Y(e,t,n,r+1));return t.delete(e),Object.freeze(i),i}if(!Nt(e))throw Error(`${n} must contain only JSON values`);if(t.has(e))throw Error(`${n} must not contain cycles`);t.add(e);let i={};for(let[a,o]of Object.entries(e))Mt(i,a,Y(o,t,n,r+1));return t.delete(e),Object.freeze(i)}function Mt(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0})}function Nt(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var Pt=`pi-web.terminal`,X=`management`;function Ft(e=Ut()){return Q(e)===X||e===Ut()&&Z()!==void 0&&Q(Z()?.search)===X}function It(e=$()){return Ft(e?.search)?`management`:`normal`}function Lt(e,t=$(),n=`management`){return Bt(e,t,n,!0)}function Rt(e,t=$(),n=`management`){return Bt(e,t,n,!1)}function zt(e){if(e!==`management`||globalThis.history===void 0)return;let t=$();t!==void 0&&Vt(t)?.token!==void 0&&(t.searchParams.delete(`token`),globalThis.history.replaceState(globalThis.history.state,``,`${t.pathname}${t.search}${t.hash}`))}function Bt(e,t,n,r){if(n===`normal`||t===void 0)return e;let i=Vt(t);if(i===void 0)return e;let a=new URL(e,t.origin);return a.searchParams.set(`embed`,i.embed),i.token!==void 0&&a.searchParams.set(`token`,i.token),`${a.pathname}${a.search}${r?a.hash:``}`}function Vt(e){let t=Ht(e);return t===void 0?Ht(Z()):t}function Ht(e){if(e===void 0)return;let t=Q(e.search),n=e.searchParams.get(`token`)?.trim();if(t===X)return{embed:t,...n===void 0||n===``?{}:{token:n}}}function Z(){if(typeof window<`u`&&window.parent!==window)try{return new URL(window.parent.location.href)}catch{return}}function Q(e){if(e===void 0||e===``)return;let t=new URLSearchParams(e).get(`embed`)?.trim();return t===``?void 0:t}function Ut(){return typeof window>`u`?void 0:window.location.search}function $(){if(globalThis.location===void 0)return;let e=globalThis.location;if(typeof e.href==`string`&&e.href!==``)return new URL(e.href);let t=typeof e.protocol==`string`&&e.protocol!==``?e.protocol:`http:`,n=typeof e.host==`string`&&e.host!==``?e.host:`localhost`,r=typeof e.search==`string`?e.search:``;return new URL(`${t}//${n}/${r}`)}export{o as $,qe as A,U as B,nt as C,Ke as D,We as E,Ve as F,z as G,ke as H,ze as I,ge as J,A as K,Re as L,Ue as M,Ye as N,Ge as O,He as P,m as Q,Le as R,q as S,rt as T,V as U,Oe as V,j as W,_e as X,Te as Y,h as Z,Tt as _,Rt as a,Ct as b,lt as c,it as d,a as et,K as f,pt as g,wt as h,Lt as i,Be as j,Je as k,at as l,xt as m,Ft as n,Pt as o,mt as p,ve as q,zt as r,ut as s,It as t,ot as u,yt as v,tt as w,St as x,bt as y,Me as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,T as t,V as n,i as r,n as i,o as a,w as o,y as s}from"./managementEmbed-Bx8Mwzdw.js";var c=`machine.`;function l(e,n){if(f(e,n),t(n))throw Error(`Reserved PI WEB plugin id: ${n}`);return p(e,n)}function u(t,n){if(f(t,n),!e(n))throw Error(`PI WEB bundled plugin id is required: ${n}`);return p(t,n)}function d(t,n){return e(n)?u(t,n):l(t,n)}function f(e,t){if(e===``)throw Error(`Machine id is required`);if(!o(t))throw Error(`Invalid PI WEB plugin id: ${t}`)}function p(e,t){return`${c}${m(e)}.${t}`}function m(e){return[...new TextEncoder().encode(e)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function h(e){return{id:e.id,cwd:e.cwd,...e.name===void 0?{}:{name:e.name},...e.metadata===void 0?{}:{metadata:structuredClone(e.metadata)},archived:e.archived===!0,pending:`clientPendingStart`in e&&e.clientPendingStart===!0}}function g(e){let t=e.selectedSession,n=e.selectedMachine,r=e.selectedProject,i=e.selectedWorkspace;return{...n===void 0?{}:{selectedMachine:{id:n.id,name:n.name,kind:n.kind}},...r===void 0?{}:{selectedProject:{id:r.id,name:r.name,path:r.path}},...i===void 0?{}:{selectedWorkspace:{id:i.id,projectId:i.projectId,path:i.path,label:i.label,isMain:i.isMain,...i.branch===void 0?{}:{branch:i.branch},...i.isGitRepo===void 0?{}:{isGitRepo:i.isGitRepo},...i.isGitWorktree===void 0?{}:{isGitWorktree:i.isGitWorktree},...i.provider===void 0?{}:{provider:structuredClone(i.provider)},...i.removal===void 0?{}:{removal:{actionLabel:i.removal.actionLabel,confirmation:i.removal.confirmation}}}},...t===void 0?{}:{selectedSession:h(t)}}}function _(e){return{...g(e),...e.workspaceTool===void 0?{}:{workspaceTool:e.workspaceTool},mainView:e.mainView===`navigation`||e.mainView===`chat`?e.mainView:`workspace`,...e.piWebStatus===void 0?{}:{piWebStatus:e.piWebStatus}}}function v(e){return{...e,state:_(e.state)}}function y(e){return{...e,async activate(t){let n=await e.activate(t),{actions:r,applicationPanels:i,workspacePanels:a,workspaceLabels:o,sessionLabels:s}=n.contributions;return{...n,...n.start===void 0?{}:{start:n.start.bind(n)},...n.dispose===void 0?{}:{dispose:n.dispose.bind(n)},contributions:{...n.contributions,...r===void 0?{}:{actions:r.map(({enabled:e,disabledReason:t,run:n,...r})=>({...r,...e===void 0?{}:{enabled:t=>e(v(t))},...t===void 0?{}:{disabledReason:e=>t(v(e))},run:e=>n(v(e))}))},...i===void 0?{}:{applicationPanels:i.map(({visible:e,badge:t,render:n,...r})=>({...r,...e===void 0?{}:{visible:t=>e(v(t))},...t===void 0?{}:{badge:e=>t(v(e))},render:e=>n(v(e))}))},...a===void 0?{}:{workspacePanels:a.map(({visible:e,fileOpenQuery:t,badge:n,onInvalidate:r,render:i,...a})=>({...a,...e===void 0?{}:{visible:t=>e(v(t))},...t===void 0?{}:{fileOpenQuery:(e,n)=>t(v(e),n)},...n===void 0?{}:{badge:e=>n(v(e))},...r===void 0?{}:{onInvalidate:(e,t)=>r(v(e),t)},render:e=>i(v(e))}))},...o===void 0?{}:{workspaceLabels:o.map(({visible:e,items:t,...n})=>({...n,...e===void 0?{}:{visible:t=>e(v(t))},items:e=>t(v(e))}))},...s===void 0?{}:{sessionLabels:s.map(({visible:e,items:t,...n})=>({...n,...e===void 0?{}:{visible:t=>e(v(t))},items:e=>t(v(e))}))}}}}}}async function b(e=`pi-web-plugins/manifest.json`,t={}){let i=n(r(e)),a=await w(i,t.manifest),o=[],s=[],c=[],l=a.plugins.filter(e=>t.shouldLoadPlugin?.(e)!==!1).sort((e,t)=>Number(t.scope===`bundled`)-Number(e.scope===`bundled`)),u=t.moduleLoader??S,d=new Map,f=e=>{let t=d.get(e);if(t!==void 0)return t;let n=(async()=>{let t=x(e.module,i);return N(await C(t,u),t)})();return n.catch(()=>void 0),d.set(e,n),n},p=a.terminalMode===`required`&&l[0]?.id===`pi-web.terminal`;p||l.forEach(e=>{f(e)});for(let[e,n]of l.entries()){let r=M(n,t.machineId);o.push(r);try{let t=await f(n);p&&e===0&&l.slice(1).forEach(e=>{f(e)}),s.push({...r,plugin:t,...n.backendRevision===void 0?{}:{backendRevision:n.backendRevision},...n.pairedRequestVersion===void 0?{}:{pairedRequestVersion:n.pairedRequestVersion},...n.pairedChannelVersion===void 0?{}:{pairedChannelVersion:n.pairedChannelVersion}})}catch(e){if(c.push({entry:n,error:e}),a.terminalMode===`required`&&n.id===`pi-web.terminal`)return{terminalMode:a.terminalMode,declarations:o,registrations:[],failures:c}}}return{terminalMode:a.terminalMode,declarations:o,registrations:s,failures:c}}function x(e,t,r){return e.startsWith(`/`)?r===void 0?n(e):n(e,r):new URL(e,t).toString()}async function S(e){return import(e)}async function C(e,t){let n,r=new Promise((t,r)=>{n=setTimeout(()=>{r(Error(`Browser plugin import timed out after 10000ms: ${e}`))},1e4)});try{return await Promise.race([Promise.resolve().then(()=>t(e)),r])}finally{clearTimeout(n)}}async function w(e,t){if(t!==void 0)return T(t);let n=await fetch(e,{cache:`no-store`});if(!n.ok)throw Error(await O(n));return T(await n.json())}function T(n){if(!F(n)||!Array.isArray(n.plugins))throw Error(`Invalid plugin manifest`);if(n.lifecycleVersion!==2)throw Error(`Unsupported plugin manifest lifecycle version`);let r=D(n.terminalMode),s=n.plugins.map(n=>{if(!F(n)||typeof n.id!=`string`||typeof n.module!=`string`||n.module===``)throw Error(`Invalid plugin manifest entry`);let r=n.id;if(!o(r))throw Error(`Invalid plugin manifest id: ${r}`);let i=E(n.source),a=E(n.scope);if(t(r)&&!(e(r)&&i===`bundled`&&a===`bundled`))throw Error(`Reserved plugin manifest id: ${r}`);let s=k(n.backendRevision),c=A(n.pairedRequestVersion),l=A(n.pairedChannelVersion);if((c!==void 0||l!==void 0)&&s===void 0)throw Error(`Invalid plugin manifest entry`);return{id:r,module:n.module,...s===void 0?{}:{backendRevision:s},...c===void 0?{}:{pairedRequestVersion:c},...l===void 0?{}:{pairedChannelVersion:l},...i===void 0?{}:{source:i},...a===void 0?{}:{scope:a},machineSpecific:j(n.machineSpecific)}}),c=new Set;for(let e of s){if(c.has(e.id))throw Error(`Duplicate plugin manifest id: ${e.id}`);c.add(e.id)}let l=s.find(({id:e})=>e===a);if(r===`required`&&!i()){if(l===void 0||s[0]!==l||!l.machineSpecific)throw Error(`Required Terminal plugin manifest entry is unavailable or out of order`);if(l.backendRevision===void 0||l.pairedRequestVersion!==1||l.pairedChannelVersion!==1)throw Error(`Required Terminal plugin manifest entry is incompatible`)}else if(r===`recovery-disabled`&&l!==void 0)throw Error(`Recovery-disabled plugin manifest must not publish Terminal`);return{terminalMode:r,plugins:s}}function E(e){return typeof e==`string`?e:void 0}function D(e){if(e===`required`||e===`recovery-disabled`)return e;throw Error(`Invalid plugin manifest Terminal mode`)}async function O(e){let t;try{let n=await e.json();if(F(n)){let e=n.error,r=n.detail,i=n.message;t=typeof r==`string`?`${typeof e==`string`?`${e}: `:``}${r}`:typeof i==`string`?i:typeof e==`string`?e:void 0}}catch{}return`Failed to load plugin manifest (${`${String(e.status)}${e.statusText===``?``:` ${e.statusText}`}`})${t===void 0?``:`: ${t}`}`}function k(e){if(e!==void 0)try{return s(e)}catch{throw Error(`Invalid plugin manifest entry`)}}function A(e){if(e!==void 0){if(e!==1)throw Error(`Invalid plugin manifest entry`);return e}}function j(e){if(e===void 0)return!1;if(typeof e!=`boolean`)throw Error(`Invalid plugin manifest entry`);return e}function M(e,t){return Object.freeze({id:t===void 0?e.id:d(t,e.id),machineSpecific:e.machineSpecific,...e.source===void 0?{}:{manifestSource:e.source},...e.scope===void 0?{}:{manifestScope:e.scope},...t===void 0?{}:{machineId:t,sourcePluginId:e.id}})}function N(e,t){if(!F(e))throw Error(`Plugin module ${t} did not export an object`);let n=e.default;if(F(n)&&n.apiVersion!==4&&n.apiVersion!==5)throw Error(`Unsupported browser plugin API version for ${t}: ${String(n.apiVersion)} (expected 4 or 5)`);if(!P(n))throw Error(`Plugin module ${t} default export is not a PiWebPlugin`);return y(n)}function P(e){return F(e)&&(e.apiVersion===4||e.apiVersion===5)&&typeof e.name==`string`&&typeof e.activate==`function`}function F(e){return typeof e==`object`&&!!e}var I=`modulepreload`,L=function(e,t){return new URL(e,t).href},R={},z=function(e){return e.pathname.endsWith(`.css`)},B=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},V=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=L(t,n);let r=s(t),i=z(r);return B(R,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:I,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{u as a,h as i,b as n,g as r,V as t};
|
package/dist/client/index.html
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
11
11
|
<link rel="manifest" crossorigin="use-credentials" href="./manifest.webmanifest" />
|
|
12
12
|
<style>:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--pi-control-font-size:16px;--pi-control-font-family:var(--pi-font,system-ui, sans-serif);--pi-control-monospace-font-family:var(--pi-mono,ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);--pi-bg:#0d1117;--pi-surface:#161b22;--pi-surface-hover:#21262d;--pi-terminal-bg:#05070a;--pi-terminal-text:#e6edf3;--pi-border:#30363d;--pi-border-muted:#21262d;--pi-text:#e6edf3;--pi-text-secondary:#c9d1d9;--pi-text-bright:#f0f6fc;--pi-muted:#8b949e;--pi-dim:#6e7681;--pi-accent:#58a6ff;--pi-accent-border:#2f81f7;--pi-selection-bg:#0d2847;--pi-success:#3fb950;--pi-success-border:#238636;--pi-success-bg:#0f1b12;--pi-success-surface:#0f2a16;--pi-success-ring:#3fb95055;--pi-warning:#d29922;--pi-warning-border:#6e5200;--pi-warning-surface:#1f1a10;--pi-danger:#ff7b72;--pi-purple:#d2a8ff;--pi-purple-border:#a371f7;--pi-purple-surface:#21132f;--pi-overlay:#0008;--pi-shadow-soft:#0006;--pi-shadow:#0008;--pi-shadow-strong:#000b;--pi-bg-overlay-soft:#0d1117dd;--pi-bg-overlay:#0d1117e6;--pi-success-bg-overlay:#0f1b12ee;--pi-terminal-selection:#264f78}html,body{background:var(--pi-bg);height:100%;color:var(--pi-text);margin:0;overflow:hidden}body{min-height:100dvh}</style>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-Chn9pQPv.js"></script>
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/managementEmbed-Bx8Mwzdw.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="./assets/preload-helper-XpATwJ5c.js">
|
|
15
16
|
</head>
|
|
16
17
|
<body>
|
|
17
18
|
<pi-web-app></pi-web-app>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Lucide icons: square-pen, search, folder-plus, settings-2
|
|
2
|
+
https://lucide.dev
|
|
3
|
+
|
|
4
|
+
ISC License
|
|
5
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
6
|
+
|
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
copyright notice and this permission notice appear in all copies.
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
11
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
12
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
13
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
14
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
15
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
16
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
|
|
18
|
+
The search icon is derived from Feather, under the MIT License:
|
|
19
|
+
Copyright (c) 2013-present Cole Bemis
|
|
20
|
+
|
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
23
|
+
in the Software without restriction, including without limitation the rights
|
|
24
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
26
|
+
furnished to do so, subject to the following conditions:
|
|
27
|
+
The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
copies or substantial portions of the Software.
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
32
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
33
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
34
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
|
+
SOFTWARE.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Custom UI Codex
|
|
2
|
+
|
|
3
|
+
PI WEB 的可选 Lit 展示插件,随包提供且默认启用。插件 ID 为 `pi-web.custom-ui-codex`,提供 Codex 风格导航、聊天外围布局、设置导航及 Paper / Graphite 明暗主题;消息、编辑器、会话状态与权限仍由宿主持有。
|
|
4
|
+
|
|
5
|
+
导航将当前选中项目、工作区与会话组合为嵌套分支,普通文件夹省略重复的工作区层;顶部提供新会话、搜索及添加项目入口,设置位于底部。标题栏以文字“操作”按钮打开宿主操作面板,不显示闪电图标。侧栏使用浅薄荷色或深炭色,聊天输入区居中、最大宽度为 816px。桌面设置采用全屏布局与 240px 导航栏,窄屏改为可横向滚动的分区导航。可用操作遵循宿主权限,管理视图不增加普通模式操作。
|
|
6
|
+
|
|
7
|
+
树形布局只展开当前选中分支,项目和工作区通过节点按钮展开或收起,手机端也不使用单层互斥折叠;定向定位会话会先展开所选祖先。数据仍由宿主按选择加载,不同时读取未选中项目的会话。左侧附件按钮的来源菜单采用起始对齐,在窄屏保留可读空间。上传、删除、附件移除、信任和会话菜单继续使用原有功能;切换展示不重建消息视图和输入编辑器,不清除草稿或附件。
|
|
8
|
+
|
|
9
|
+
在网关的插件设置中禁用,或在有效机器配置中设置:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"plugins": {
|
|
14
|
+
"pi-web.custom-ui-codex": { "enabled": false }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
刷新页面后恢复宿主默认界面。单独启停此浏览器插件不要求重启 daemon,中文语言插件与普通/管理模式权限保持独立。配置与主题兼容规则见[配置参考](https://github.com/nayuto-wakusei/pi-web-ChineseTranslation/blob/main/docs/config.md#default-theme-and-streaming),公开展示区域契约见[插件指南](https://github.com/nayuto-wakusei/pi-web-ChineseTranslation/blob/main/docs/plugins.md#ui-presentation)。
|
|
20
|
+
|
|
21
|
+
## 设计与比较基线
|
|
22
|
+
|
|
23
|
+
布局设计参考 [DSH Codex UI 的固定版本 `0e1b22b4`](https://github.com/MichengAI/dsh-codex-ui/tree/0e1b22b42fdbeea5d528abcb922d9ed4d2ae3c82)(Apache-2.0),面向 PI WEB 复用其视觉语言与布局组织,不宣称像素级一致或包含 DSH 的全部功能。这是 PI WEB 原生实现,不包含该项目的代码或品牌素材,也不加载 DSH 或 React 运行时。工具图标使用 Lucide,许可与署名见 `LICENSE-icons`。
|
|
24
|
+
|
|
25
|
+
核心默认视觉的比较基线固定为上游 [`2546a98803ac949c3a88b74a014df772c02327af`](https://github.com/jmfederico/pi-web/commit/2546a98803ac949c3a88b74a014df772c02327af)。此标记用于核对布局与控件,不代表已合并该提交包含的全部功能、API 或后端行为。本地性能比较的原始源码基线为含普通文件夹信任修复的 [`3ce6b61b`](https://github.com/nayuto-wakusei/pi-web-ChineseTranslation/commit/3ce6b61b);复现方式和测量边界见[开发检查](https://github.com/nayuto-wakusei/pi-web-ChineseTranslation/blob/main/docs/development-checks.md#web-ui-performance)。
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/* Presentation only: the host still owns scrolling, drafts and every operation. */
|
|
2
|
+
:host(pi-web-ui-presentation) .codex-chat-shell {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex: 1 1 0;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
min-height: 0;
|
|
9
|
+
background: var(--pi-bg);
|
|
10
|
+
}
|
|
11
|
+
:host(pi-web-ui-presentation) .codex-transcript {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex: 1 1 0;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
min-width: 0;
|
|
16
|
+
min-height: 0;
|
|
17
|
+
}
|
|
18
|
+
:host(pi-web-ui-presentation) .codex-composer {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
flex: 0 0 auto;
|
|
21
|
+
width: 100%;
|
|
22
|
+
max-width: 816px;
|
|
23
|
+
padding: 12px 28px 28px;
|
|
24
|
+
margin-inline: auto;
|
|
25
|
+
}
|
|
26
|
+
:host(chat-view) .chat-wrap { border: 0; background: var(--pi-bg); }
|
|
27
|
+
:host(chat-view) .chat { padding: 24px max(24px, calc((100% - 760px) / 2)) 56px; }
|
|
28
|
+
:host(chat-view) .msg.conversation-message {
|
|
29
|
+
margin-block: 0 28px;
|
|
30
|
+
padding: 0;
|
|
31
|
+
border: 0;
|
|
32
|
+
--ui-transcript-bg: var(--pi-bg);
|
|
33
|
+
}
|
|
34
|
+
:host(chat-view) .msg.user {
|
|
35
|
+
width: fit-content;
|
|
36
|
+
max-width: min(85%, 660px);
|
|
37
|
+
margin-inline-start: auto;
|
|
38
|
+
border-radius: 8px;
|
|
39
|
+
--ui-transcript-bg: color-mix(in srgb, var(--pi-text) 5%, var(--pi-bg));
|
|
40
|
+
}
|
|
41
|
+
:host(chat-view) .conversation-body { padding: 12px 16px; }
|
|
42
|
+
:host(chat-view) .msg.assistant .conversation-body { padding-inline: 0; }
|
|
43
|
+
:host(chat-view) .msg-actions-strip { border-radius: 6px; box-shadow: none; }
|
|
44
|
+
:host(chat-view) .msg.event-group { margin-block: 12px 20px; }
|
|
45
|
+
:host(chat-view) .msg.event-group > summary { border-radius: 6px; }
|
|
46
|
+
:host(conversation-layout) .activity-region { inset-inline: 16px; }
|
|
47
|
+
:host(conversation-layout) .activity-dock { border-radius: 6px; }
|
|
48
|
+
|
|
49
|
+
:host(prompt-editor) footer {
|
|
50
|
+
position: relative;
|
|
51
|
+
border: 1px solid var(--pi-border-muted);
|
|
52
|
+
border-radius: 8px;
|
|
53
|
+
background: var(--pi-bg);
|
|
54
|
+
box-shadow: 0 4px 20px color-mix(in srgb, var(--pi-text) 5%, transparent);
|
|
55
|
+
}
|
|
56
|
+
:host(prompt-editor) footer:focus-within { border-color: var(--pi-border); }
|
|
57
|
+
:host(prompt-editor) footer.shell-mode { border-color: var(--pi-success); background: var(--pi-success-bg); }
|
|
58
|
+
:host(prompt-editor) .editor-wrap, :host(prompt-editor) .editor-input { position: static; }
|
|
59
|
+
:host(prompt-editor) .markdown-editor { border-radius: 8px 8px 0 0; }
|
|
60
|
+
:host(prompt-editor) .markdown-editor:focus-within { outline: none; }
|
|
61
|
+
:host(prompt-editor) .markdown-editor .cm-editor { min-height: 66px; border-radius: 8px 8px 0 0; padding-block: 14px; background: transparent; }
|
|
62
|
+
:host(prompt-editor) .markdown-editor .cm-content { padding-inline: 14px 64px; }
|
|
63
|
+
:host(prompt-editor) .actions {
|
|
64
|
+
min-height: 48px;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
padding: 4px 6px 6px 52px;
|
|
67
|
+
gap: 4px;
|
|
68
|
+
border: 0;
|
|
69
|
+
background: transparent;
|
|
70
|
+
}
|
|
71
|
+
:host(prompt-editor) .compact-status { align-items: center; justify-content: flex-end; }
|
|
72
|
+
:host(prompt-editor) .actions .ui-button { min-height: 36px; border: 0; border-radius: 6px; padding-inline: 8px; background: transparent; }
|
|
73
|
+
:host(prompt-editor) .actions .ui-button:hover:not(:disabled) { background: var(--pi-surface-hover); }
|
|
74
|
+
:host(prompt-editor) .actions .ui-button--icon { width: 36px; min-width: 36px; padding: 0; }
|
|
75
|
+
:host(prompt-editor) .select-model { font-size: 12px; color: var(--pi-text-secondary); }
|
|
76
|
+
:host(prompt-editor) .editor-input .editor-attach {
|
|
77
|
+
position: absolute;
|
|
78
|
+
inset-inline-start: 6px;
|
|
79
|
+
inset-inline-end: auto;
|
|
80
|
+
bottom: 6px;
|
|
81
|
+
width: 36px;
|
|
82
|
+
height: 36px;
|
|
83
|
+
min-width: 36px;
|
|
84
|
+
min-height: 36px;
|
|
85
|
+
padding: 0;
|
|
86
|
+
border: 0;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
background: var(--pi-surface);
|
|
89
|
+
}
|
|
90
|
+
:host(prompt-editor) .editor-input .editor-attach .prompt-action-icon { width: 18px; height: 18px; }
|
|
91
|
+
:host(prompt-editor) .actions .default-send-action:not(:disabled) { border-radius: 50%; background: var(--pi-text); color: var(--pi-bg); }
|
|
92
|
+
:host(prompt-editor) .actions .default-send-action:hover:not(:disabled) { background: var(--pi-text-secondary); }
|
|
93
|
+
:host(prompt-editor) .editor-chat-navigation { inset-inline-end: 10px; top: 8px; border: 0; border-radius: 6px; }
|
|
94
|
+
:host(prompt-editor) .editor-chat-navigation .chat-jumps button + button { border: 0; }
|
|
95
|
+
:host(prompt-editor) .attachments, :host(prompt-editor) .prompt-chips { margin: 8px 14px; }
|
|
96
|
+
:host(prompt-editor) .attachment-remove { min-width: 32px; }
|
|
97
|
+
:host(prompt-editor) .attach-source-panel { --ui-popup-placement: above-start; padding: 4px; border-radius: 8px; }
|
|
98
|
+
:host(prompt-editor) .mode-hint { bottom: 54px; right: 14px; }
|
|
99
|
+
:host(autocomplete-menu) .menu { padding: 4px; border-radius: 8px; }
|
|
100
|
+
:host(autocomplete-menu) button { border: 0; border-radius: 6px; }
|
|
101
|
+
|
|
102
|
+
:host(app-context-bar) .context-bar { min-height: 48px; border: 0; padding-inline: 8px; }
|
|
103
|
+
:host(app-context-bar) .context-item + .context-item { border: 0; }
|
|
104
|
+
:host(app-context-bar) .context-item + .context-item::before { content: "/"; align-self: center; color: var(--pi-dim); }
|
|
105
|
+
:host(app-context-bar) .context-chip { min-height: 40px; padding-inline: 8px; border-radius: 6px; font-size: 13px; }
|
|
106
|
+
:host(app-context-bar) .context-chip:hover { background: var(--pi-surface-hover); }
|
|
107
|
+
:host(app-context-bar) .context-actions, :host(app-context-bar) .context-actions > * + * { border: 0; }
|
|
108
|
+
:host(app-context-bar) .context-action-button { border-radius: 6px; }
|
|
109
|
+
|
|
110
|
+
:host(settings-dialog) { --codex-settings-rail-width: 240px; }
|
|
111
|
+
:host(settings-dialog) modal-surface {
|
|
112
|
+
--modal-surface-backdrop-padding: 0;
|
|
113
|
+
--modal-surface-place-items: stretch;
|
|
114
|
+
--modal-surface-width: 100%;
|
|
115
|
+
--modal-surface-max-width: none;
|
|
116
|
+
--modal-surface-height: 100%;
|
|
117
|
+
--modal-surface-min-height: 0;
|
|
118
|
+
--modal-surface-max-height: none;
|
|
119
|
+
--modal-surface-border: 0;
|
|
120
|
+
--modal-surface-radius: 0;
|
|
121
|
+
--modal-surface-shadow: none;
|
|
122
|
+
}
|
|
123
|
+
:host(settings-dialog) .settings-header {
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset-block-start: 0;
|
|
126
|
+
inset-inline-start: 0;
|
|
127
|
+
z-index: 2;
|
|
128
|
+
box-sizing: border-box;
|
|
129
|
+
width: var(--codex-settings-rail-width);
|
|
130
|
+
height: 60px;
|
|
131
|
+
padding: 12px 8px;
|
|
132
|
+
border: 0;
|
|
133
|
+
background: var(--codex-sidebar-bg, var(--pi-surface));
|
|
134
|
+
}
|
|
135
|
+
:host(settings-dialog) .settings-header h1 {
|
|
136
|
+
position: absolute;
|
|
137
|
+
width: 1px;
|
|
138
|
+
height: 1px;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
clip-path: inset(50%);
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
}
|
|
143
|
+
:host(settings-dialog) .settings-header .close-button {
|
|
144
|
+
justify-content: flex-start;
|
|
145
|
+
gap: 8px;
|
|
146
|
+
width: 100%;
|
|
147
|
+
min-height: 36px;
|
|
148
|
+
border: 0;
|
|
149
|
+
border-radius: 6px;
|
|
150
|
+
padding: 6px 10px;
|
|
151
|
+
color: var(--pi-text-secondary);
|
|
152
|
+
font-size: 14px;
|
|
153
|
+
}
|
|
154
|
+
:host(settings-dialog) .settings-back-icon { font-size: 0; }
|
|
155
|
+
:host(settings-dialog) .settings-back-icon::before { content: "\2190"; font-size: 18px; }
|
|
156
|
+
:host(settings-dialog) .settings-back-label { display: inline; font-size: 14px; }
|
|
157
|
+
:host(settings-dialog) .settings-body {
|
|
158
|
+
flex: 1 1 0;
|
|
159
|
+
height: 100%;
|
|
160
|
+
grid-template-columns: var(--codex-settings-rail-width) minmax(0, 1fr);
|
|
161
|
+
}
|
|
162
|
+
:host(settings-dialog) pi-web-ui-presentation[region="settings-navigation"] {
|
|
163
|
+
min-height: 0;
|
|
164
|
+
padding-block-start: 60px;
|
|
165
|
+
border-inline-end: 1px solid var(--pi-border-muted);
|
|
166
|
+
background: var(--codex-sidebar-bg, var(--pi-surface));
|
|
167
|
+
}
|
|
168
|
+
:host(pi-web-ui-presentation) .codex-settings-navigation { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; padding: 8px; }
|
|
169
|
+
:host(settings-dialog) .settings-nav { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: transparent; }
|
|
170
|
+
:host(settings-dialog) .settings-nav button {
|
|
171
|
+
flex: 0 0 auto;
|
|
172
|
+
width: 100%;
|
|
173
|
+
min-height: 44px;
|
|
174
|
+
border: 0;
|
|
175
|
+
border-radius: 6px;
|
|
176
|
+
padding: 8px 12px;
|
|
177
|
+
background: transparent;
|
|
178
|
+
text-align: start;
|
|
179
|
+
box-shadow: none;
|
|
180
|
+
font-weight: 400;
|
|
181
|
+
}
|
|
182
|
+
:host(settings-dialog) .settings-nav button.selected { background: var(--pi-selection-bg); }
|
|
183
|
+
:host(settings-dialog) .settings-nav button:hover:not(:disabled) { background: var(--pi-surface-hover); }
|
|
184
|
+
:host(settings-dialog) .settings-nav small { font-size: 11px; line-height: 16px; }
|
|
185
|
+
:host(settings-dialog) .settings-nav strong { font-weight: 400; }
|
|
186
|
+
:host(settings-dialog) .settings-main { overflow: hidden; background: var(--pi-bg); }
|
|
187
|
+
:host(settings-dialog) .settings-content { box-sizing: border-box; padding: 48px max(32px, calc((100% - 800px) / 2)) 48px; }
|
|
188
|
+
:host(settings-dialog) .settings-machine { margin-inline: 32px; padding: 16px 0; border-color: var(--pi-border-muted); }
|
|
189
|
+
:host(settings-panel-frame) .section-heading { padding: 0 0 28px; gap: 16px; border: 0; background: transparent; }
|
|
190
|
+
:host(settings-panel-frame) .heading-copy { gap: 10px; }
|
|
191
|
+
:host(settings-panel-frame) h2 { font-size: 24px; line-height: 32px; font-weight: 600; }
|
|
192
|
+
:host(settings-panel-frame) .description { font-size: 13px; line-height: 20px; }
|
|
193
|
+
:host(settings-panel-frame) .content { gap: 28px; }
|
|
194
|
+
:host(settings-panel-frame) .notice-stack { gap: 8px; margin-block-end: 20px; }
|
|
195
|
+
:host(settings-general-panel) .settings-sections { gap: 36px; }
|
|
196
|
+
:host(settings-general-panel) .ui-settings-section, :host(settings-theme-panel) .theme-card {
|
|
197
|
+
padding: 0;
|
|
198
|
+
gap: 16px;
|
|
199
|
+
border: 0;
|
|
200
|
+
background: transparent;
|
|
201
|
+
}
|
|
202
|
+
:host(settings-general-panel) .ui-settings-heading h3, :host(settings-theme-panel) .ui-settings-heading h3 { font-size: 14px; font-weight: 600; }
|
|
203
|
+
:host(settings-general-panel) .ui-settings-heading p, :host(settings-theme-panel) .ui-settings-heading p { font-size: 12px; line-height: 18px; }
|
|
204
|
+
:host(settings-general-panel) .config-form {
|
|
205
|
+
gap: 0;
|
|
206
|
+
border: 1px solid var(--pi-border-muted);
|
|
207
|
+
border-radius: 8px;
|
|
208
|
+
padding: 0 16px;
|
|
209
|
+
background: color-mix(in srgb, var(--pi-text) 2%, var(--pi-bg));
|
|
210
|
+
}
|
|
211
|
+
:host(settings-general-panel) .config-form > .field {
|
|
212
|
+
display: grid;
|
|
213
|
+
grid-template-columns: minmax(160px, 1fr) minmax(160px, 280px);
|
|
214
|
+
align-items: center;
|
|
215
|
+
column-gap: 16px;
|
|
216
|
+
row-gap: 6px;
|
|
217
|
+
padding-block: 14px;
|
|
218
|
+
}
|
|
219
|
+
:host(settings-general-panel) .config-form > .field + .field { border-block-start: 1px solid var(--pi-border-muted); }
|
|
220
|
+
:host(settings-general-panel) .field > :is(input, select, textarea) { grid-column: 2; max-width: 100%; }
|
|
221
|
+
:host(settings-general-panel) .field > small { grid-column: 1 / -1; }
|
|
222
|
+
:host(settings-general-panel) .ui-settings-path, :host(settings-general-panel) .ui-settings-summary { border-radius: 6px; padding: 12px; background: var(--pi-surface); }
|
|
223
|
+
:host(settings-general-panel) .form-actions { padding-block: 14px; }
|
|
224
|
+
:host(settings-theme-panel) .current-theme { border: 1px solid var(--pi-border-muted); border-radius: 8px; background: color-mix(in srgb, var(--pi-text) 2%, var(--pi-bg)); }
|
|
225
|
+
:host(settings-theme-panel) .field { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 280px); align-items: center; gap: 16px; }
|
|
226
|
+
:host(settings-theme-panel) .theme-actions { justify-content: flex-start; }
|
|
227
|
+
|
|
228
|
+
@media (max-width: 760px) {
|
|
229
|
+
:host(settings-dialog) { --codex-settings-rail-width: 100%; }
|
|
230
|
+
:host(settings-dialog) .settings-header { position: relative; flex: 0 0 auto; height: auto; padding-top: max(8px, env(safe-area-inset-top)); }
|
|
231
|
+
:host(settings-dialog) .settings-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
|
|
232
|
+
:host(settings-dialog) pi-web-ui-presentation[region="settings-navigation"] { min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--pi-border-muted); }
|
|
233
|
+
:host(pi-web-ui-presentation) .codex-settings-navigation { flex: 0 0 auto; min-height: 44px; padding: 4px 8px 8px; }
|
|
234
|
+
:host(settings-dialog) .settings-nav { flex: 0 0 auto; min-height: 44px; flex-direction: row; gap: 4px; overflow-x: auto; overflow-y: hidden; }
|
|
235
|
+
:host(settings-dialog) .settings-nav button { width: auto; min-height: 40px; padding: 8px 12px; }
|
|
236
|
+
:host(settings-dialog) .settings-nav small { display: none; }
|
|
237
|
+
:host(settings-dialog) .settings-content { padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }
|
|
238
|
+
:host(settings-dialog) .settings-machine { margin-inline: 20px; }
|
|
239
|
+
:host(settings-panel-frame) .section-heading { display: flex; padding-block-end: 24px; }
|
|
240
|
+
:host(settings-panel-frame) h2 { font-size: 22px; line-height: 30px; }
|
|
241
|
+
:host(settings-general-panel) .config-form > .field, :host(settings-theme-panel) .field { grid-template-columns: minmax(0, 1fr); }
|
|
242
|
+
:host(settings-general-panel) .field > :is(input, select, textarea) { grid-column: 1; }
|
|
243
|
+
}
|
|
244
|
+
@media (max-width: 600px) {
|
|
245
|
+
:host(pi-web-ui-presentation) .codex-composer { padding: 8px 12px max(12px, env(safe-area-inset-bottom)); }
|
|
246
|
+
:host(chat-view) .chat { padding: 20px 16px 36px; }
|
|
247
|
+
:host(chat-view) .msg.user { max-width: 92%; }
|
|
248
|
+
:host(prompt-editor) .select-model { padding-inline: 4px; }
|
|
249
|
+
:host(prompt-editor) .actions { padding-inline-end: 4px; }
|
|
250
|
+
:host(app-context-bar) .context-bar { padding-inline: 4px; }
|
|
251
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
:host(pi-web-ui-presentation[region="navigation"]) { background: var(--codex-sidebar-bg, var(--pi-surface)); }
|
|
2
|
+
:host(pi-web-ui-presentation) .codex-navigation { display: flex; flex: 1 1 0; min-height: 0; min-width: 0; flex-direction: column; font: 14px/20px var(--pi-font, system-ui, sans-serif); color: var(--pi-text-secondary); }
|
|
3
|
+
:host(pi-web-ui-presentation) .codex-header { flex: 0 0 auto; }
|
|
4
|
+
:host(pi-web-ui-presentation) .codex-commands { display: grid; gap: 2px; padding: 12px 8px 16px; }
|
|
5
|
+
:host(pi-web-ui-presentation) .codex-command { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; justify-content: flex-start; border: 0; padding: 6px 8px; text-align: start; border-radius: 6px; font-size: 14px; font-weight: 400; background: transparent; }
|
|
6
|
+
:host(pi-web-ui-presentation) .codex-command svg { flex: 0 0 auto; width: 16px; height: 16px; }
|
|
7
|
+
:host(pi-web-ui-presentation) .codex-command:hover:not(:disabled) { background: var(--codex-sidebar-hover, var(--pi-surface-hover)); }
|
|
8
|
+
:host(pi-web-ui-presentation) .codex-machines { flex: 0 0 auto; }
|
|
9
|
+
:host(pi-web-ui-presentation) .codex-project-tree { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; padding: 0 8px 16px; }
|
|
10
|
+
:host(pi-web-ui-presentation) ::slotted(project-list), :host(pi-web-ui-presentation) ::slotted(workspace-list), :host(pi-web-ui-presentation) ::slotted(session-list) { flex: 0 0 auto; max-height: none; min-height: 0; border: 0; overflow: visible; }
|
|
11
|
+
:host(pi-web-ui-presentation) .codex-footer { flex: 0 0 auto; padding: 8px; border-top: 1px solid var(--pi-border-muted); }
|
|
12
|
+
:host(pi-web-ui-presentation) .codex-footer:empty { display: none; }
|
|
13
|
+
:host(app-navigation-panel) header { min-height: 48px; padding: 4px 6px; border: 0; align-items: center; }
|
|
14
|
+
:host(app-navigation-panel) .header-actions, :host(app-navigation-panel) .header-actions > * + *, :host(app-navigation-panel) .panel-toggle { border: 0; }
|
|
15
|
+
:host(app-navigation-panel) header .ui-button { border-radius: 6px; min-height: 36px; min-width: 32px; }
|
|
16
|
+
:host(app-navigation-panel) header .actions-button { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 6px 12px; background: transparent; color: var(--pi-text-secondary); font-size: 14px; font-weight: 400; }
|
|
17
|
+
:host(app-navigation-panel) .actions-button .actions-icon { display: none; }
|
|
18
|
+
:host(app-navigation-panel) .actions-button .actions-label { display: inline; }
|
|
19
|
+
:host(app-navigation-panel) header .actions-button:hover:not(:disabled) { background: var(--codex-sidebar-hover, var(--pi-surface-hover)); }
|
|
20
|
+
:host(app-navigation-panel) navigation-section-resize-handle { display: none; }
|
|
21
|
+
:host(app-navigation-panel[data-navigation-layout="tree"]) project-list { flex: 0 0 auto; max-height: none; min-height: 0; border: 0; overflow: visible; }
|
|
22
|
+
:host(pi-web-app) .shell { --navigation-panel-size: 260px; }
|
|
23
|
+
:host(app-navigation-panel[compact]) header { display: flex; }
|
|
24
|
+
:host(machine-switcher) .machine-trigger, :host(machine-switcher) .machine-identity { min-height: 36px; border: 0; background: transparent; }
|
|
25
|
+
:host(project-list) section, :host(workspace-list) section, :host(session-list) section { border: 0; padding: 0; background: transparent; }
|
|
26
|
+
:host(project-list) .list-body, :host(workspace-list) .list-body, :host(session-list) .list-body { overflow: visible; padding: 0; }
|
|
27
|
+
:host(project-list) h2, :host(workspace-list) h2, :host(session-list) h2 { min-height: 36px; margin: 0; padding: 6px 2px; border: 0; font-size: 12px; font-weight: 400; color: var(--pi-muted); text-transform: none; }
|
|
28
|
+
:host(project-list) section > h2.ui-toolbar, :host(workspace-list) section > h2.ui-toolbar, :host(session-list) section > h2.ui-toolbar { background: transparent; box-shadow: none; }
|
|
29
|
+
:host(project-list) .ui-toolbar-title, :host(workspace-list) .ui-toolbar-title, :host(session-list) .ui-toolbar-title { min-height: 28px; padding: 0; font-size: 12px; font-weight: 400; }
|
|
30
|
+
:host(project-list) .section-name, :host(workspace-list) .section-name, :host(session-list) .section-name { font-size: 12px; font-weight: 400; }
|
|
31
|
+
:host(project-list) .action-row, :host(workspace-list) .action-row, :host(session-list) .action-row { min-height: 34px; margin: 1px 0; border-radius: 6px; }
|
|
32
|
+
:host(project-list) .action-row, :host(workspace-list) .action-row, :host(session-list) .action-row { border-bottom: 0; box-shadow: none; }
|
|
33
|
+
:host(project-list) .action-main, :host(workspace-list) .action-main, :host(session-list) .action-main { min-height: 34px; box-sizing: border-box; border: 0; border-radius: 6px 0 0 6px; background: transparent; padding: 6px 8px; font-size: 13px; line-height: 20px; }
|
|
34
|
+
:host(project-list) .action-menu-toggle, :host(workspace-list) .action-menu-toggle, :host(session-list) .action-menu-toggle { min-height: 34px; min-width: 28px; width: 28px; border: 0; border-radius: 0 6px 6px 0; background: transparent; }
|
|
35
|
+
:host(project-list) .action-main > small { display: none; }
|
|
36
|
+
:host(project-list) .workspace-primary-label, :host(workspace-list) .workspace-primary-label { font-weight: 500; }
|
|
37
|
+
:host(project-list) .action-row.selected .action-main, :host(project-list) .action-row.selected .action-menu-toggle,
|
|
38
|
+
:host(workspace-list) .action-row.selected .action-main, :host(workspace-list) .action-row.selected .action-menu-toggle,
|
|
39
|
+
:host(session-list) .action-row.selected .action-main, :host(session-list) .action-row.selected .action-menu-toggle { border-color: transparent; background: var(--pi-selection-bg); }
|
|
40
|
+
:host(project-list) .action-row:hover .action-main, :host(project-list) .action-row:hover .action-menu-toggle,
|
|
41
|
+
:host(workspace-list) .action-row:hover .action-main, :host(workspace-list) .action-row:hover .action-menu-toggle,
|
|
42
|
+
:host(session-list) .action-row:hover .action-main, :host(session-list) .action-row:hover .action-menu-toggle { background: var(--codex-sidebar-hover, var(--pi-surface-hover)); }
|
|
43
|
+
:host(project-list) .tree-children, :host(workspace-list) .tree-children { margin-inline-start: 10px; padding-inline-start: 8px; border-inline-start: 1px solid var(--pi-border-muted); }
|
|
44
|
+
:host(project-list[tree-layout]), :host(workspace-list[tree-layout]), :host(session-list) { display: block; min-height: 0; overflow: visible; }
|
|
45
|
+
:host(project-list[tree-layout]) section, :host(workspace-list[tree-layout]) section { height: auto; overflow: visible; }
|
|
46
|
+
:host(project-list) .tree-disclosure, :host(workspace-list) .tree-disclosure { color: var(--pi-muted); }
|
|
47
|
+
:host(project-list[tree-layout]) .action-main, :host(workspace-list[tree-layout]) .action-main { display: flex; align-items: center; gap: 5px; padding-inline-start: 2px; }
|
|
48
|
+
:host(project-list[tree-layout]) .workspace-primary, :host(workspace-list[tree-layout]) .workspace-primary { flex: 1 1 auto; }
|
|
49
|
+
:host(project-list[tree-layout]) .tree-disclosure, :host(workspace-list[tree-layout]) .tree-disclosure { flex: 0 0 24px; min-width: 24px; width: 24px; height: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; border-radius: 4px; }
|
|
50
|
+
:host(project-list[tree-layout]) .tree-disclosure:hover, :host(workspace-list[tree-layout]) .tree-disclosure:hover { background: var(--codex-sidebar-hover, var(--pi-surface-hover)); }
|
|
51
|
+
:host(session-list) .action-main { padding-inline-start: calc(8px + var(--depth, 0) * 16px + var(--agent-offset, 0px)); padding-inline-end: 20px; }
|
|
52
|
+
:host(session-list) .action-main.selecting { padding-inline-start: calc(38px + var(--depth, 0) * 16px + var(--agent-offset, 0px)); }
|
|
53
|
+
:host(session-list) .session-checkbox { inset-inline-start: calc(10px + var(--depth, 0) * 16px + var(--agent-offset, 0px)); }
|
|
54
|
+
:host(session-list) .session-secondary { font-size: 11px; line-height: 16px; margin-top: 2px; color: var(--pi-muted); }
|
|
55
|
+
:host(session-list) .action-row { contain-intrinsic-size: auto 52px; }
|
|
56
|
+
:host(project-list) .action-activity, :host(workspace-list) .action-activity, :host(session-list) .action-activity { inset-inline-start: auto; inset-inline-end: 4px; }
|
|
57
|
+
:host(session-list) .plain-heading { padding: 0 4px; }
|
|
58
|
+
:host(session-list) h2 .ui-button { min-height: 28px; padding: 4px; border: 0; border-radius: 4px; background: transparent; }
|
|
59
|
+
:host(session-list) h2 .ui-button--icon { min-width: 24px; width: 24px; }
|
|
60
|
+
:host(session-list) .session-heading-actions { border: 0; }
|
|
61
|
+
:host(session-list) h2 > .section-unread-count { padding-inline: 3px; font-size: 11px; }
|
|
62
|
+
:host(session-list) .subheading { min-height: 28px; padding-block: 4px; }
|
|
63
|
+
:host(session-list) .cleanup-entry { font-size: 11px; }
|
|
64
|
+
:host(project-list) .empty-list, :host(workspace-list) .empty-list { display: grid; gap: 6px; padding: 12px 8px; font-size: 12px; line-height: 20px; }
|
|
65
|
+
:host(project-list) .empty-list strong, :host(workspace-list) .empty-list strong { font-size: 13px; font-weight: 500; }
|
|
66
|
+
:host(project-list) .empty-list small, :host(workspace-list) .empty-list small { white-space: normal; }
|
|
67
|
+
:host(pi-web-ui-presentation) .codex-context-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
|
|
68
|
+
:host(pi-web-ui-presentation) .codex-context-content { flex: 1 1 0; min-width: 0; }
|
|
69
|
+
:host(pi-web-ui-presentation) .codex-context-actions { flex: 0 0 auto; }
|
|
70
|
+
:host(action-palette) { --ui-dialog-width: 640px; }
|
|
71
|
+
:host(action-palette) .ui-dialog-header { padding: 8px; }
|
|
72
|
+
:host(action-palette) .ui-selection-option { padding: 12px 16px; }
|
|
73
|
+
@media (max-width: 600px) {
|
|
74
|
+
:host(pi-web-ui-presentation) .codex-command { min-height: 44px; }
|
|
75
|
+
:host(project-list) .action-main, :host(workspace-list) .action-main, :host(session-list) .action-main,
|
|
76
|
+
:host(project-list) .action-menu-toggle, :host(workspace-list) .action-menu-toggle, :host(session-list) .action-menu-toggle { min-height: 44px; }
|
|
77
|
+
}
|
package/dist/{client/assets/graphite-DquaqFXU.css → pi-web-plugins/custom-ui-codex/graphite.css}
RENAMED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
--codex-sidebar-bg: #1d2120;
|
|
3
|
+
--codex-sidebar-hover: #303432;
|
|
2
4
|
--pi-font: system-ui, sans-serif;
|
|
3
5
|
--pi-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
4
6
|
--pi-thinking: var(--pi-muted);
|
|
@@ -16,13 +18,13 @@
|
|
|
16
18
|
--pi-chat-system-bg: var(--pi-surface);
|
|
17
19
|
--pi-chat-activity-bg: var(--pi-surface);
|
|
18
20
|
--pi-chat-compacting-bg: var(--pi-surface);
|
|
19
|
-
--pi-bg: #
|
|
21
|
+
--pi-bg: #191b1a;
|
|
20
22
|
--pi-surface: #222222;
|
|
21
23
|
--pi-surface-hover: #303030;
|
|
22
24
|
--pi-terminal-bg: #181818;
|
|
23
25
|
--pi-terminal-text: #e8e8e8;
|
|
24
26
|
--pi-border: #555555;
|
|
25
|
-
--pi-border-muted: #
|
|
27
|
+
--pi-border-muted: #343936;
|
|
26
28
|
--pi-text: #e8e8e8;
|
|
27
29
|
--pi-text-secondary: #bcbcbc;
|
|
28
30
|
--pi-text-bright: #ffffff;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
--codex-sidebar-bg: #eef7f5;
|
|
3
|
+
--codex-sidebar-hover: #dfe8e5;
|
|
2
4
|
--pi-font: system-ui, sans-serif;
|
|
3
5
|
--pi-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
4
6
|
--pi-thinking: var(--pi-muted);
|
|
@@ -21,16 +23,16 @@
|
|
|
21
23
|
--pi-surface-hover: #eaeaea;
|
|
22
24
|
--pi-terminal-bg: #ffffff;
|
|
23
25
|
--pi-terminal-text: #202020;
|
|
24
|
-
--pi-border: #
|
|
25
|
-
--pi-border-muted: #
|
|
26
|
-
--pi-text: #
|
|
27
|
-
--pi-text-secondary: #
|
|
26
|
+
--pi-border: #cbd0ce;
|
|
27
|
+
--pi-border-muted: #e3e8e6;
|
|
28
|
+
--pi-text: #272b2a;
|
|
29
|
+
--pi-text-secondary: #4e5253;
|
|
28
30
|
--pi-text-bright: #101010;
|
|
29
31
|
--pi-muted: #626262;
|
|
30
32
|
--pi-dim: #707070;
|
|
31
33
|
--pi-accent: #303030;
|
|
32
34
|
--pi-accent-border: #626262;
|
|
33
|
-
--pi-selection-bg: #
|
|
35
|
+
--pi-selection-bg: #e2eeea;
|
|
34
36
|
--pi-success: #287044;
|
|
35
37
|
--pi-success-border: #287044;
|
|
36
38
|
--pi-success-bg: #f1f6f2;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Generated from pi-web-plugins/custom-ui-codex/pi-web-plugin.ts. Do not edit directly.
|
|
2
|
+
const presentationCapability = {
|
|
3
|
+
pluginId: "pi-web", id: "ui-presentation", version: 1,
|
|
4
|
+
parse: (value) => {
|
|
5
|
+
if (typeof value !== "object" || value === null || !("version" in value) || value.version !== 1 || !("regions" in value) || !Array.isArray(value.regions))
|
|
6
|
+
throw new Error("UI presentation capability v1 is unavailable");
|
|
7
|
+
return { version: 1, regions: ["navigation", "context-bar", "chat-chrome", "settings-navigation"] };
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
/** PI WEB-native presentation inspired by DSH Codex UI; no DSH runtime or stores. */
|
|
11
|
+
export default {
|
|
12
|
+
apiVersion: 5,
|
|
13
|
+
name: "Custom UI Codex",
|
|
14
|
+
requires: [presentationCapability],
|
|
15
|
+
activate: ({ html, svg, translate }) => {
|
|
16
|
+
const t = (key, fallback) => translate?.(key, fallback) ?? fallback;
|
|
17
|
+
const slot = (name) => html `<slot name=${name}></slot>`;
|
|
18
|
+
// Lucide icons, ISC/MIT. Attribution is bundled in LICENSE-icons.
|
|
19
|
+
const icon = (id) => svg `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${id === "new-task" ? svg `<path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/>`
|
|
20
|
+
: id === "search" ? svg `<path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/>`
|
|
21
|
+
: id === "add-project" ? svg `<path d="M12 10v6M9 13h6"/><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>`
|
|
22
|
+
: svg `<path d="M14 17H5M19 7h-9"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>`}</svg>`;
|
|
23
|
+
const actions = (context, footer) => (context.actions ?? []).filter((action) => (action.id === "settings") === footer).map((action) => html `
|
|
24
|
+
<button type="button" class="ui-button codex-command" title=${action.label} ?disabled=${action.disabled === true} @click=${action.run}>${icon(action.id)}<span>${action.label}</span></button>
|
|
25
|
+
`);
|
|
26
|
+
return {
|
|
27
|
+
contributions: {
|
|
28
|
+
stylesheets: [
|
|
29
|
+
{ id: "codex", url: new URL("./codex.css?no-inline", import.meta.url).href, order: 1100 },
|
|
30
|
+
{ id: "chat-settings", url: new URL("./chat-settings.css?no-inline", import.meta.url).href, order: 1101 },
|
|
31
|
+
],
|
|
32
|
+
themes: [
|
|
33
|
+
{ id: "paper", name: "Paper", description: t("client.themes.paper.description", "White and neutral grays with restrained status colors."), order: 40, colorScheme: "light", stylesheets: [{ id: "palette", url: new URL("./paper.css?no-inline", import.meta.url).href }] },
|
|
34
|
+
{ id: "graphite", name: "Graphite", description: t("client.themes.graphite.description", "Charcoal and neutral grays with restrained status colors."), order: 50, colorScheme: "dark", stylesheets: [{ id: "palette", url: new URL("./graphite.css?no-inline", import.meta.url).href }] },
|
|
35
|
+
],
|
|
36
|
+
themePairs: [{ id: "paper-graphite", name: "Paper / Graphite", description: t("client.themes.neutralPair.description", "Follow the system light/dark preference with neutral gray themes."), order: 20, light: "paper", dark: "graphite" }],
|
|
37
|
+
uiPresentations: [
|
|
38
|
+
{ id: "navigation", region: "navigation", navigationLayout: "tree", render: (context) => html `
|
|
39
|
+
<div class="codex-navigation" data-mode=${context.mode}>
|
|
40
|
+
<div class="codex-header">${slot("header")}</div>
|
|
41
|
+
<div class="codex-commands">${actions(context, false)}</div>
|
|
42
|
+
<div class="codex-machines">${slot("machines")}</div>
|
|
43
|
+
<div class="codex-project-tree">
|
|
44
|
+
${slot("projects")}${slot("workspaces")}${slot("sessions")}
|
|
45
|
+
</div>
|
|
46
|
+
<footer class="codex-footer">${actions(context, true)}</footer>
|
|
47
|
+
</div>
|
|
48
|
+
` },
|
|
49
|
+
{ id: "context-bar", region: "context-bar", render: () => html `<div class="codex-context-bar"><div class="codex-context-content">${slot("content")}</div><div class="codex-context-actions">${slot("actions")}</div></div>` },
|
|
50
|
+
{ id: "chat-chrome", region: "chat-chrome", render: () => html `<div class="codex-chat-shell"><div class="codex-transcript">${slot("transcript")}</div><div class="codex-composer">${slot("composer")}</div></div>` },
|
|
51
|
+
{ id: "settings-navigation", region: "settings-navigation", render: () => html `<div class="codex-settings-navigation">${slot("navigation")}</div>` },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
};
|