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.
This commit is contained in:
2026-02-15 15:44:09 +08:00
parent 03bb21d5c6
commit 838eec30a8
205 changed files with 1868 additions and 344 deletions
@@ -0,0 +1 @@
import{e as b}from"./vendor-escape-string-regexp-BaJN9MlJ.js";import{c as E}from"./vendor-unist-util-is-BPZGFiMU.js";import{v as I}from"./vendor-unist-util-visit-parents-BHoKBdZX.js";function q(e,f,u){const p=E((u||{}).ignore||[]),x=R(f);let d=-1;for(;++d<x.length;)I(e,"text",m);function m(n,r){let c=-1,t;for(;++c<r.length;){const a=r[c],s=t?t.children:void 0;if(p(a,s?s.indexOf(a):void 0,t))return;t=a}if(t)return w(n,r)}function w(n,r){const c=r[r.length-1],t=x[d][0],a=x[d][1];let s=0;const y=c.children.indexOf(n);let v=!1,l=[];t.lastIndex=0;let o=t.exec(n.value);for(;o;){const h=o.index,A={index:o.index,input:o.input,stack:[...r,n]};let i=a(...o,A);if(typeof i=="string"&&(i=i.length>0?{type:"text",value:i}:void 0),i===!1?t.lastIndex=h+1:(s!==h&&l.push({type:"text",value:n.value.slice(s,h)}),Array.isArray(i)?l.push(...i):i&&l.push(i),s=h+o[0].length,v=!0),!t.global)break;o=t.exec(n.value)}return v?(s<n.value.length&&l.push({type:"text",value:n.value.slice(s)}),c.children.splice(y,1,...l)):l=[n],y+l.length}}function R(e){const f=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const u=!e[0]||Array.isArray(e[0])?e:[e];let g=-1;for(;++g<u.length;){const p=u[g];f.push([k(p[0]),P(p[1])])}return f}function k(e){return typeof e=="string"?new RegExp(b(e),"g"):e}function P(e){return typeof e=="function"?e:function(){return e}}export{q as f};