Files
llm-in-text/.build-check/assets/vendor-rope-sequence-nfUW61tr.js
T
ydy0615 838eec30a8 feat: add theme management with light and dark modes
- Implemented a new composable `useTheme` for managing theme state.
- Added functions to read and write theme preference to local storage.
- Applied theme styles to the DOM based on user preference.
- Introduced a toggle function to switch between light and dark themes.

refactor: enhance copilot plugin functionality

- Improved request handling with sequence and document versioning.
- Refactored ghost text handling to improve clarity and efficiency.
- Updated markdown insertion logic to handle parsed content more robustly.
- Enhanced error handling and logging for better debugging.

style: update global styles for light and dark themes

- Defined CSS variables for light and dark themes to streamline styling.
- Improved overall styling consistency and responsiveness.
- Added transitions for smoother theme changes and interactions.
2026-02-15 15:44:09 +08:00

2 lines
3.3 KiB
JavaScript

var l=200,p=function(){};p.prototype.append=function(t){return t.length?(t=p.from(t),!this.length&&t||t.length<l&&this.leafAppend(t)||this.length<l&&t.leafPrepend(this)||this.appendInner(t)):this};p.prototype.prepend=function(t){return t.length?p.from(t).append(this):this};p.prototype.appendInner=function(t){return new u(this,t)};p.prototype.slice=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.length),t>=r?p.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};p.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};p.prototype.forEach=function(t,r,e){r===void 0&&(r=0),e===void 0&&(e=this.length),r<=e?this.forEachInner(t,r,e,0):this.forEachInvertedInner(t,r,e,0)};p.prototype.map=function(t,r,e){r===void 0&&(r=0),e===void 0&&(e=this.length);var n=[];return this.forEach(function(i,s){return n.push(t(i,s))},r,e),n};p.from=function(t){return t instanceof p?t:t&&t.length?new o(t):p.empty};var o=(function(h){function t(e){h.call(this),this.values=e}h&&(t.__proto__=h),t.prototype=Object.create(h&&h.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(n,i){return n==0&&i==this.length?this:new t(this.values.slice(n,i))},t.prototype.getInner=function(n){return this.values[n]},t.prototype.forEachInner=function(n,i,s,f){for(var a=i;a<s;a++)if(n(this.values[a],f+a)===!1)return!1},t.prototype.forEachInvertedInner=function(n,i,s,f){for(var a=i-1;a>=s;a--)if(n(this.values[a],f+a)===!1)return!1},t.prototype.leafAppend=function(n){if(this.length+n.length<=l)return new t(this.values.concat(n.flatten()))},t.prototype.leafPrepend=function(n){if(this.length+n.length<=l)return new t(n.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t})(p);p.empty=new o([]);var u=(function(h){function t(r,e){h.call(this),this.left=r,this.right=e,this.length=r.length+e.length,this.depth=Math.max(r.depth,e.depth)+1}return h&&(t.__proto__=h),t.prototype=Object.create(h&&h.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,n,i,s){var f=this.left.length;if(n<f&&this.left.forEachInner(e,n,Math.min(i,f),s)===!1||i>f&&this.right.forEachInner(e,Math.max(n-f,0),Math.min(this.length,i)-f,s+f)===!1)return!1},t.prototype.forEachInvertedInner=function(e,n,i,s){var f=this.left.length;if(n>f&&this.right.forEachInvertedInner(e,n-f,Math.max(i,f)-f,s+f)===!1||i<f&&this.left.forEachInvertedInner(e,Math.min(n,f),i,s)===!1)return!1},t.prototype.sliceInner=function(e,n){if(e==0&&n==this.length)return this;var i=this.left.length;return n<=i?this.left.slice(e,n):e>=i?this.right.slice(e-i,n-i):this.left.slice(e,i).append(this.right.slice(0,n-i))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t})(p);export{p as R};