@moberg_hr/work-tree 2.6.0 → 2.6.1
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/bin.js +1 -1
- package/dist/{chunk-RI6PDM2P.js → chunk-EEZGYD3Z.js} +3 -3
- package/dist/chunk-WWS6UQD5.js +9 -0
- package/dist/{cli-CMKLQSAZ.js → cli-GP3LT7GT.js} +3 -3
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-CKM2c8yQ.js → PtyView-iF4TcK2S.js} +2 -2
- package/dist/web/assets/{PtyView-CKM2c8yQ.js.map → PtyView-iF4TcK2S.js.map} +1 -1
- package/dist/web/assets/{index-Bk5sa_rZ.js → index-BITgwylo.js} +4 -4
- package/dist/web/assets/{index-Bk5sa_rZ.js.map → index-BITgwylo.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/{web-JDIY5YYG.js → web-VPD4NPNC.js} +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-CNRMBMJU.js +0 -9
- /package/dist/{chunk-RI6PDM2P.js.map → chunk-EEZGYD3Z.js.map} +0 -0
- /package/dist/{chunk-CNRMBMJU.js.map → chunk-WWS6UQD5.js.map} +0 -0
- /package/dist/{cli-CMKLQSAZ.js.map → cli-GP3LT7GT.js.map} +0 -0
- /package/dist/{web-JDIY5YYG.js.map → web-VPD4NPNC.js.map} +0 -0
package/dist/bin.js
CHANGED
|
@@ -46,7 +46,7 @@ if (args[0] === "hook") {
|
|
|
46
46
|
} else {
|
|
47
47
|
const { default: chalk } = await import("chalk");
|
|
48
48
|
if (!process.env.NO_COLOR && chalk.level === 0) chalk.level = 1;
|
|
49
|
-
const { run } = await import("./cli-
|
|
49
|
+
const { run } = await import("./cli-GP3LT7GT.js");
|
|
50
50
|
const { withReporter } = await import("./report-BSETCIYQ.js");
|
|
51
51
|
const { consoleReporter, reportStreamFor } = await import("./console-reporter-XU6VFUZE.js");
|
|
52
52
|
await withReporter(consoleReporter(reportStreamFor(args)), () => run(args));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WWS6UQD5.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveProjectTarget
|
|
7
7
|
} from "./chunk-R2SR3PER.js";
|
|
@@ -210,7 +210,7 @@ var COMMANDS = [
|
|
|
210
210
|
{ names: ["todo"], load: async () => (await import("./todo-OE62TNES.js")).todoCommand },
|
|
211
211
|
{ names: ["hydrate"], load: async () => (await import("./hydrate-WZNGM3RI.js")).hydrateCommand },
|
|
212
212
|
{ names: ["diff"], load: async () => (await import("./diff-V6A3E6PF.js")).diffCommand },
|
|
213
|
-
{ names: ["web"], load: async () => (await import("./web-
|
|
213
|
+
{ names: ["web"], load: async () => (await import("./web-VPD4NPNC.js")).webCommand },
|
|
214
214
|
{ names: ["hook"], load: async () => (await import("./hook-2XFXXOT2.js")).hookCommand },
|
|
215
215
|
{ names: ["run"], load: async () => (await import("./run-B5HRDSZB.js")).runCommand },
|
|
216
216
|
{ names: ["broadcast"], load: async () => (await import("./broadcast-2TIITC7F.js")).broadcastCommand },
|
|
@@ -318,4 +318,4 @@ export {
|
|
|
318
318
|
commandsFor,
|
|
319
319
|
run
|
|
320
320
|
};
|
|
321
|
-
//# sourceMappingURL=chunk-
|
|
321
|
+
//# sourceMappingURL=chunk-EEZGYD3Z.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
COMMANDS,
|
|
4
4
|
commandsFor,
|
|
5
5
|
run
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-EEZGYD3Z.js";
|
|
7
|
+
import "./chunk-WWS6UQD5.js";
|
|
8
8
|
import "./chunk-R2SR3PER.js";
|
|
9
9
|
import "./chunk-AKGDIBSE.js";
|
|
10
10
|
import "./chunk-RCYI7SRA.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
commandsFor,
|
|
16
16
|
run
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=cli-
|
|
18
|
+
//# sourceMappingURL=cli-GP3LT7GT.js.map
|
package/dist/wd-bin.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "./chunk-S5HJT7CM.js";
|
|
5
5
|
import {
|
|
6
6
|
run
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-EEZGYD3Z.js";
|
|
8
|
+
import "./chunk-WWS6UQD5.js";
|
|
9
9
|
import "./chunk-R2SR3PER.js";
|
|
10
10
|
import "./chunk-AKGDIBSE.js";
|
|
11
11
|
import "./chunk-RCYI7SRA.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./index-
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./index-BITgwylo.js";var s=a(r(),1),c=2e3,l=20,u=class{sentAt=null;samples=[];keySent(e){this.sentAt===null&&(this.sentAt=e)}output(e){if(this.sentAt===null)return null;let t=e-this.sentAt;return this.sentAt=null,t<0||t>c?null:(this.samples.push(t),this.samples.length>l&&this.samples.shift(),t)}median(){if(this.samples.length===0)return null;let e=[...this.samples].sort((e,t)=>e-t),t=e.length>>1;return e.length%2?e[t]:(e[t-1]+e[t])/2}},d=[2e3,1e4,6e4],f=6e5,p=class{losses=[];lost(e){return this.losses=this.losses.filter(t=>e-t<f),this.losses.push(e),d[this.losses.length-1]??null}},m=/^(\s*)([●⏺⎿])(\s)/u,h=/^(?:[-*+•]\s|\d+[.)]\s|#{1,6}\s|>\s|[│┃|┌└├╭╰─━])/u,g=/^(?:[-*+•]|\d+[.)])\s+/u,_=e=>e.length-e.trimStart().length;function v(e,t,n=0){let r=e.split(/\r?\n/).map(e=>e.replace(/\s+$/u,``).replace(m,(e,t,n,r)=>t+` `+r)),i=e=>e===0?n:0,a=[],o=null;for(let e=0;e<r.length;e++){let n=r[e],s=n.trimStart(),c=i(e)+_(n),l=i(e)+n.length;if(o&&s&&o.end+1+(s.split(/\s/u)[0]?.length??0)>t-2&&!h.test(s)&&c===o.cont){o.text+=` `+s,o.end=l;continue}if(o&&a.push(o.text),!s){o=null,a.push(``);continue}let u=g.exec(s);o={text:(e===0?``:` `.repeat(_(n)))+s,cont:c+(u?u[0].length:0),end:l},/[│┃]/u.test(s)&&(a.push(o.text),o=null)}o&&a.push(o.text);let s=a.slice(1).filter(e=>e.trim()),c=s.length?Math.min(...s.map(_)):0;return a.map((e,t)=>t===0?e.trimStart():e.slice(Math.min(c,_(e)))).join(`
|
|
2
2
|
`)}var y=/^\s*[│┃|].*[│┃|]\s*$/u,ee=/^\s*(?:[┌├└╭╰┏┣┗┡╞][─━┬┼┴┳╋┻┐┤┘╮╯┓┫┛┩╡═╪╤╧\s]*|\|?(?:\s*:?-{3,}:?\s*\|)+\s*:?-*:?\s*\|?)$/u,te=e=>e.trim().replace(/^[│┃|]|[│┃|]$/gu,``).split(/[│┃|]/u).map(e=>e.trim());function ne(e){let t=[[]],n=0;for(let r of e)ee.test(r)?(n++,t[t.length-1].length&&t.push([])):y.test(r)&&t[t.length-1].push(te(r));let r=t.filter(e=>e.length);if(!r.length||!r.some(e=>e.some(e=>e.length>1)))return null;let i=r.length>2||r.length===2&&r[1].length===1,a=e=>e[0].map((t,n)=>e.map(e=>e[n]??``).filter(Boolean).join(` `)),o=i?r.map(a):[a(r[0]),...r.slice(1).flat()];return n||o.length>1?o:null}function re(e){let[t,...n]=e,r=(e,t)=>`<tr>${e.map(e=>`<${t}>${o(e)}</${t}>`).join(``)}</tr>`;return`<table><thead>${r(t,`th`)}</thead><tbody>${n.map(e=>r(e,`td`)).join(``)}</tbody></table>`}function ie(e,t,r=0){let i=v(e,t,r),a=i.split(`
|
|
3
3
|
`),s=e=>y.test(e)||ee.test(e);if(!a.some(e=>y.test(e)))return{text:i,html:null};let c=[],l=[],u=()=>{l.length&&c.push(`<p>${l.map(o).join(`<br>`)}</p>`),l=[]},d=0;for(let e=0;e<a.length;)if(s(a[e])){let t=e;for(;t<a.length&&s(a[t]);)t++;let n=ne(a.slice(e,t));u(),n?(c.push(re(n)),d++):c.push(`<pre>${a.slice(e,t).map(o).join(`
|
|
4
4
|
`)}</pre>`),e=t}else a[e].trim()?l.push(a[e]):u(),e++;return u(),{text:i,html:d?n(c.join(``)):null}}var ae=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,b=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},x=(e,t,n,r)=>{for(var i=r>1?void 0:r?oe(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ae(t,n,i),i},S=(e,t)=>(n,r)=>t(n,r,e),se=`Terminal input`,ce={get:()=>se,set:e=>se=e},le=`Too much output to announce, navigate to rows manually to read`,C={get:()=>le,set:e=>le=e};function w(e){return e.replace(/\r?\n/g,`\r`)}function T(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function ue(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function de(e,t,n,r){e.stopPropagation(),e.clipboardData&&fe(e.clipboardData.getData(`text/plain`),t,n,r)}function fe(e,t,n,r){e=w(e),e=T(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function pe(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function me(e,t,n,r,i){pe(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function E(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function he(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var ge=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},_e=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},ve=``,ye=` `,be=class e{constructor(){this.fg=0,this.bg=0,this.extended=new xe}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},xe=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},D=class e extends be{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new xe,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?E(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Se=`di$target`,Ce=`di$dependencies`,we=new Map;function Te(e){return e[Ce]||[]}function Ee(e){if(we.has(e))return we.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);De(t,e,r)};return t._id=e,we.set(e,t),t}function De(e,t,n){t[Se]===t?t[Ce].push({id:e,index:n}):(t[Ce]=[{id:e,index:n}],t[Se]=t)}var Oe=Ee(`BufferService`),ke=Ee(`CoreMouseService`),Ae=Ee(`CoreService`),je=Ee(`CharsetService`),Me=Ee(`InstantiationService`),Ne=Ee(`LogService`),Pe=Ee(`OptionsService`),Fe=Ee(`OscLinkService`),Ie=Ee(`UnicodeService`),Le=Ee(`DecorationService`),Re=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new D,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):ze(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};Re=x([S(0,Oe),S(1,Pe),S(2,Fe)],Re);function ze(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
@@ -90,4 +90,4 @@ void main() {
|
|
|
90
90
|
`),C=!0});let ue=t.onData(e=>{if(C){e===`\r`&&h(e=>e+1);return}de(e)});function de(e){C||(se?(x.send(JSON.stringify({type:`input`,data:e})),w.keySent(performance.now())):ce.push(e))}let fe=t.cols,pe=t.rows,me=(e=!1)=>{c.current&&(n.fit(),(e||t.cols!==fe||t.rows!==pe)&&(fe=t.cols,pe=t.rows,se&&x.send(JSON.stringify({type:`resize`,cols:t.cols,rows:t.rows}))))},E=()=>me(),he=typeof ResizeObserver<`u`?new ResizeObserver(()=>me()):null;he?he.observe(o.current):window.addEventListener(`resize`,E),l.current=()=>{me(!0),t.focus()};let ge=()=>me(!0);return t.textarea?.addEventListener(`focus`,ge),()=>{d=!0,clearTimeout(S),clearTimeout(s),t.textarea?.removeEventListener(`paste`,re,!0),t.element?.removeEventListener(`copy`,oe,!0),t.textarea?.removeEventListener(`focus`,ge),l.current=null,he?.disconnect(),window.removeEventListener(`resize`,E),ue.dispose();try{x.close()}catch{}t.dispose()}},[e,m]);let oe=()=>{ae(!0),h(e=>e+1)};(0,s.useEffect)(()=>{if(!g||!a)return;let e=setInterval(()=>{document.visibilityState===`visible`&&oe()},Qf);return()=>clearInterval(e)},[g,a]);let b=()=>{window.confirm(`Start this session's Claude here?
|
|
91
91
|
|
|
92
92
|
If it is still open in another terminal, both would write to the same conversation.`)&&(v.current=!0,_(null),h(e=>e+1))},x=n?`work tree ${n}${r?` ${r}`:``}`:`work tree <target> <branch>`,S=tp(y,te);return(0,Xf.jsxs)(Xf.Fragment,{children:[g&&(0,Xf.jsxs)(`div`,{className:`wd-pty-elsewhere`,role:`status`,children:[(0,Xf.jsxs)(`p`,{className:`wd-pty-elsewhere-title`,children:[g.confirmed?`This session’s Claude is open in another terminal`:`This session’s Claude seems to be running in another terminal`,g.lastActivity!==null&&(0,Xf.jsxs)(Xf.Fragment,{children:[` (last wrote `,$f(g.lastActivity),`)`]}),g.state===`needs_input`&&(0,Xf.jsx)(Xf.Fragment,{children:`, waiting for your answer there`}),`.`]}),(0,Xf.jsxs)(`p`,{children:[`Close it there (type `,(0,Xf.jsx)(`code`,{children:`/exit`}),`) and this tab attaches by itself — it checks every few seconds. To have both show the same screen instead, restart it with `,(0,Xf.jsx)(`code`,{children:x}),` (Ctrl+] detaches, Claude keeps running).`]}),(0,Xf.jsxs)(`p`,{className:`wd-pty-elsewhere-actions`,children:[(0,Xf.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:oe,disabled:re,children:re?`Checking…`:`Check again`}),!g.confirmed&&(0,Xf.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:b,children:`It's not running — start it here…`})]})]}),(0,Xf.jsxs)(`div`,{className:`wd-pty-frame`,style:g?{display:`none`}:void 0,children:[(0,Xf.jsx)(`div`,{ref:o,className:`wd-pty-host`}),S&&(0,Xf.jsx)(`span`,{className:`wd-pty-latency`+(S.slow?` wd-pty-latency-slow`:``),title:S.title,children:S.text}),d!==`ready`&&!g&&(0,Xf.jsx)(`div`,{className:`wd-pty-connecting`,role:`status`,children:d===`starting`?`Starting Claude — resuming the conversation…`:`Connecting…`})]})]})}function tp(e,t){let n=t!==`webgl`;return e===null&&!n?null:{text:[e!==null&&`⌁ ${Math.round(e)} ms`,n&&`DOM`].filter(Boolean).join(` · `),title:[e!==null&&`A keystroke's way to the screen and back (browser → work web → PTY host → Claude): the median of the last 20.`,n&&`Drawn without the GPU, which is slower while Claude works.`,t===`retrying`&&`The GPU renderer was lost; it is tried again by itself.`,t===`dom`&&`WebGL is unavailable here, or kept getting lost; reloading the page tries it again.`].filter(Boolean).join(` `),slow:n||(e??0)>100}}export{Qf as ELSEWHERE_RECHECK_MS,ep as PtyView,Zf as openLink};
|
|
93
|
-
//# sourceMappingURL=PtyView-
|
|
93
|
+
//# sourceMappingURL=PtyView-iF4TcK2S.js.map
|