ai-helper-agent 2.7.4 → 2.7.6
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/assets/{chat-export-xe1a3_wX.js → chat-export-CmaDpmwW.js} +1 -1
- package/dist/assets/{markdown-render-C77a3xfX.js → markdown-render-CDJ7FW_o.js} +2 -2
- package/dist/assets/options.js +1 -1
- package/dist/assets/side_panel.css +1 -1
- package/dist/assets/side_panel.js +246 -241
- package/dist/assets/{version-BEwX93ZJ.js → version-CHQCdVOZ.js} +1 -1
- package/dist/manifest.json +1 -1
- package/dist/options.html +1 -1
- package/dist/side_panel.html +16 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`appTheme`,t=[`light`,`dark`,`system`],n=`light`,r=`light`,i=null,a=null,o=[],s=!1;function c(e){let t=e!==r;r=e,typeof document<`u`&&document.documentElement.setAttribute(`data-theme`,e);try{localStorage.setItem(`appThemeResolved`,e)}catch{}t&&o.slice().forEach(t=>{try{t(e)}catch(e){console.warn(`[theme] subscriber error`,e)}})}function l(e){return e===`system`?typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e===`dark`?`dark`:`light`}(function(){try{let e=typeof localStorage<`u`&&localStorage.getItem(`appThemeResolved`);(e===`dark`||e===`light`)&&(r=e,typeof document<`u`&&document.documentElement.setAttribute(`data-theme`,e))}catch{}})();function u(){return n}function d(){return r}function f(e){o.push(e)}async function p(){typeof matchMedia<`u`&&(i=matchMedia(`(prefers-color-scheme: dark)`),a&&i.removeEventListener(`change`,a),a=()=>{n===`system`&&c(l(`system`))},i.addEventListener(`change`,a)),!s&&typeof chrome<`u`&&chrome.storage&&chrome.storage.onChanged&&(chrome.storage.onChanged.addListener((e,r)=>{r===`local`&&e.appTheme&&t.includes(e.appTheme.newValue)&&(n=e.appTheme.newValue,c(l(n)))}),s=!0);let r=await new Promise(t=>{try{chrome.storage.local.get([e],e=>{if(chrome.runtime&&chrome.runtime.lastError){t(null);return}t(e||{})})}catch{t(null)}});r!==null&&(n=t.includes(r[e])?r[e]:`light`,c(l(n)))}async function m(e){t.includes(e)&&(n=e,c(l(e)),await new Promise(t=>chrome.storage.local.set({appTheme:e},t)))}var h=`voiceInputDevice`,g=new Set([`default`,`communications`]);function _(e){return typeof e==`string`?e.trim():``}function v(e){let t=_(e),n={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0};return t?{...n,deviceId:{exact:t}}:n}function y(e){try{return(e.navigator??globalThis.navigator)?.mediaDevices||null}catch{return null}}async function b(e={}){let t=y(e);if(!t||typeof t.enumerateDevices!=`function`)return[];let n;try{n=await t.enumerateDevices()}catch{return[]}let r=new Set,i=[];for(let e of Array.isArray(n)?n:[]){if(e?.kind!==`audioinput`)continue;let t=_(e.deviceId);!t||g.has(t)||r.has(t)||(r.add(t),i.push({deviceId:t,label:typeof e.label==`string`?e.label.trim():``}))}return i}function x(e,t){let n=_(t);return n?(Array.isArray(e)?e:[]).some(e=>e?.deviceId===n):!0}var S=2500,C=Symbol(`device-enum-timeout`);async function w(e={},t=S){let n=y(e);if(!n||typeof n.enumerateDevices!=`function`)return{devices:[],timedOut:!1,unsupported:!0};let r=Math.max(0,Number(t)||2500),i=null,a=new Promise(e=>{i=setTimeout(()=>e(C),r)});try{let t=await Promise.race([b(e),a]);return t===C?{devices:[],timedOut:!0,unsupported:!1}:{devices:t,timedOut:!1,unsupported:!1}}finally{i!==null&&clearTimeout(i)}}var T=1500;async function E(e={},t=T){let n=y(e);if(!n||typeof n.getUserMedia!=`function`)return!1;let r=Math.max(0,Number(t)||1500),i=e=>{try{e?.getTracks?.().forEach(e=>e.stop())}catch{}},a=!1,o=null,s=null,c=Promise.resolve().then(()=>n.getUserMedia({audio:!0})).then(e=>(a?i(e):o=e,!!e)).catch(()=>!1),l=new Promise(e=>{s=setTimeout(()=>e(!1),r)}),u;try{u=await Promise.race([c,l])}finally{s!==null&&clearTimeout(s),a=!0,i(o),o=null}return u===!0}function D(){try{return globalThis.chrome?.storage?.local||null}catch{return null}}async function O(){let e=D();if(!e?.get)return``;try{return _((await e.get(h))?.[h])}catch{return``}}async function k(e){let t=_(e),n=D();if(!n?.set)return t;try{await n.set({[h]:t})}catch{}return t}function A(e,t={}){let n=y(t);if(!n||typeof n.addEventListener!=`function`)return()=>{};let r=()=>{try{e()}catch{}};try{n.addEventListener(`devicechange`,r)}catch{return()=>{}}return()=>{try{n.removeEventListener(`devicechange`,r)}catch{}}}async function j(e,t={}){let n=y(t);if(!n||typeof n.getUserMedia!=`function`){let e=Error(`unsupported`);throw e.name=`NotSupportedError`,e}let r=_(e);try{return{stream:await n.getUserMedia({audio:v(r)}),fellBack:!1,deviceId:r}}catch(e){let t=e?.name||``;if(!r||!(t===`OverconstrainedError`||t===`NotFoundError`||t===`NotReadableError`))throw e;return{stream:await n.getUserMedia({audio:v(``)}),fellBack:!0,deviceId:``,error:t}}}var M={version:`2.7.
|
|
1
|
+
var e=`appTheme`,t=[`light`,`dark`,`system`],n=`light`,r=`light`,i=null,a=null,o=[],s=!1;function c(e){let t=e!==r;r=e,typeof document<`u`&&document.documentElement.setAttribute(`data-theme`,e);try{localStorage.setItem(`appThemeResolved`,e)}catch{}t&&o.slice().forEach(t=>{try{t(e)}catch(e){console.warn(`[theme] subscriber error`,e)}})}function l(e){return e===`system`?typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e===`dark`?`dark`:`light`}(function(){try{let e=typeof localStorage<`u`&&localStorage.getItem(`appThemeResolved`);(e===`dark`||e===`light`)&&(r=e,typeof document<`u`&&document.documentElement.setAttribute(`data-theme`,e))}catch{}})();function u(){return n}function d(){return r}function f(e){o.push(e)}async function p(){typeof matchMedia<`u`&&(i=matchMedia(`(prefers-color-scheme: dark)`),a&&i.removeEventListener(`change`,a),a=()=>{n===`system`&&c(l(`system`))},i.addEventListener(`change`,a)),!s&&typeof chrome<`u`&&chrome.storage&&chrome.storage.onChanged&&(chrome.storage.onChanged.addListener((e,r)=>{r===`local`&&e.appTheme&&t.includes(e.appTheme.newValue)&&(n=e.appTheme.newValue,c(l(n)))}),s=!0);let r=await new Promise(t=>{try{chrome.storage.local.get([e],e=>{if(chrome.runtime&&chrome.runtime.lastError){t(null);return}t(e||{})})}catch{t(null)}});r!==null&&(n=t.includes(r[e])?r[e]:`light`,c(l(n)))}async function m(e){t.includes(e)&&(n=e,c(l(e)),await new Promise(t=>chrome.storage.local.set({appTheme:e},t)))}var h=`voiceInputDevice`,g=new Set([`default`,`communications`]);function _(e){return typeof e==`string`?e.trim():``}function v(e){let t=_(e),n={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0};return t?{...n,deviceId:{exact:t}}:n}function y(e){try{return(e.navigator??globalThis.navigator)?.mediaDevices||null}catch{return null}}async function b(e={}){let t=y(e);if(!t||typeof t.enumerateDevices!=`function`)return[];let n;try{n=await t.enumerateDevices()}catch{return[]}let r=new Set,i=[];for(let e of Array.isArray(n)?n:[]){if(e?.kind!==`audioinput`)continue;let t=_(e.deviceId);!t||g.has(t)||r.has(t)||(r.add(t),i.push({deviceId:t,label:typeof e.label==`string`?e.label.trim():``}))}return i}function x(e,t){let n=_(t);return n?(Array.isArray(e)?e:[]).some(e=>e?.deviceId===n):!0}var S=2500,C=Symbol(`device-enum-timeout`);async function w(e={},t=S){let n=y(e);if(!n||typeof n.enumerateDevices!=`function`)return{devices:[],timedOut:!1,unsupported:!0};let r=Math.max(0,Number(t)||2500),i=null,a=new Promise(e=>{i=setTimeout(()=>e(C),r)});try{let t=await Promise.race([b(e),a]);return t===C?{devices:[],timedOut:!0,unsupported:!1}:{devices:t,timedOut:!1,unsupported:!1}}finally{i!==null&&clearTimeout(i)}}var T=1500;async function E(e={},t=T){let n=y(e);if(!n||typeof n.getUserMedia!=`function`)return!1;let r=Math.max(0,Number(t)||1500),i=e=>{try{e?.getTracks?.().forEach(e=>e.stop())}catch{}},a=!1,o=null,s=null,c=Promise.resolve().then(()=>n.getUserMedia({audio:!0})).then(e=>(a?i(e):o=e,!!e)).catch(()=>!1),l=new Promise(e=>{s=setTimeout(()=>e(!1),r)}),u;try{u=await Promise.race([c,l])}finally{s!==null&&clearTimeout(s),a=!0,i(o),o=null}return u===!0}function D(){try{return globalThis.chrome?.storage?.local||null}catch{return null}}async function O(){let e=D();if(!e?.get)return``;try{return _((await e.get(h))?.[h])}catch{return``}}async function k(e){let t=_(e),n=D();if(!n?.set)return t;try{await n.set({[h]:t})}catch{}return t}function A(e,t={}){let n=y(t);if(!n||typeof n.addEventListener!=`function`)return()=>{};let r=()=>{try{e()}catch{}};try{n.addEventListener(`devicechange`,r)}catch{return()=>{}}return()=>{try{n.removeEventListener(`devicechange`,r)}catch{}}}async function j(e,t={}){let n=y(t);if(!n||typeof n.getUserMedia!=`function`){let e=Error(`unsupported`);throw e.name=`NotSupportedError`,e}let r=_(e);try{return{stream:await n.getUserMedia({audio:v(r)}),fellBack:!1,deviceId:r}}catch(e){let t=e?.name||``;if(!r||!(t===`OverconstrainedError`||t===`NotFoundError`||t===`NotReadableError`))throw e;return{stream:await n.getUserMedia({audio:v(``)}),fellBack:!0,deviceId:``,error:t}}}var M={version:`2.7.6`,tag:`v2.7.6`,commitId:`db326bdbee701e728e8397c8872f112b723c5e47`,publishedAt:`2026-11-02T14:33:25.733Z`};export{w as a,A as c,p as d,m as f,O as i,d as l,j as n,k as o,f as p,x as r,E as s,M as t,u};
|
package/dist/manifest.json
CHANGED
package/dist/options.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<script type="module" crossorigin src="/assets/theme-Cp7RrL45.js"></script>
|
|
8
8
|
<script type="module" crossorigin src="/assets/i18n-DQnIL9xy.js"></script>
|
|
9
9
|
<script type="module" crossorigin src="/assets/model-profiles-D31rvEiY.js"></script>
|
|
10
|
-
<script type="module" crossorigin src="/assets/version-
|
|
10
|
+
<script type="module" crossorigin src="/assets/version-CHQCdVOZ.js"></script>
|
|
11
11
|
<script type="module" crossorigin src="/assets/network-scope-CNRYXk74.js"></script>
|
|
12
12
|
<script type="module" crossorigin src="/assets/voice-shortcut-Dtt3nhkz.js"></script>
|
|
13
13
|
<script type="module" crossorigin src="/assets/options.js"></script>
|
package/dist/side_panel.html
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<script type="module" crossorigin src="/assets/i18n-DQnIL9xy.js"></script>
|
|
10
10
|
<script type="module" crossorigin src="/assets/model-profiles-D31rvEiY.js"></script>
|
|
11
11
|
<script type="module" crossorigin src="/assets/session-store-xr0nYACs.js"></script>
|
|
12
|
-
<script type="module" crossorigin src="/assets/version-
|
|
12
|
+
<script type="module" crossorigin src="/assets/version-CHQCdVOZ.js"></script>
|
|
13
13
|
<script type="module" crossorigin src="/assets/agent-store-1fyaAv9T.js"></script>
|
|
14
14
|
<script type="module" crossorigin src="/assets/utils-DVhZvlZX.js"></script>
|
|
15
|
-
<script type="module" crossorigin src="/assets/markdown-render-
|
|
15
|
+
<script type="module" crossorigin src="/assets/markdown-render-CDJ7FW_o.js"></script>
|
|
16
16
|
<script type="module" crossorigin src="/assets/voice-shortcut-Dtt3nhkz.js"></script>
|
|
17
17
|
<script type="module" crossorigin src="/assets/workspace-manager-DfSFPqwp.js"></script>
|
|
18
18
|
<script type="module" crossorigin src="/assets/side_panel.js"></script>
|
|
@@ -514,6 +514,20 @@
|
|
|
514
514
|
</button>
|
|
515
515
|
</div>
|
|
516
516
|
|
|
517
|
+
<!-- 使用技巧轮播条(参考 Trae IDE):无底色单行提示;悬停暂停轮播,上方浮出深色气泡显示全文 -->
|
|
518
|
+
<div class="usage-tips-bar" id="usageTipsBar" style="display: none;">
|
|
519
|
+
<span class="usage-tips-icon" aria-hidden="true">
|
|
520
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
521
|
+
<path d="M9 18h6"></path>
|
|
522
|
+
<path d="M10 21h4"></path>
|
|
523
|
+
<path d="M12 3a6 6 0 0 0-3.5 10.9c.6.4.9 1 .9 1.7V16h5.2v-.4c0-.7.3-1.3.9-1.7A6 6 0 0 0 12 3Z"></path>
|
|
524
|
+
</svg>
|
|
525
|
+
</span>
|
|
526
|
+
<span class="usage-tips-text" id="usageTipsText" aria-live="polite"></span>
|
|
527
|
+
<button class="usage-tips-dismiss" id="usageTipsDismiss" type="button" data-i18n="usageTips.dismiss">不再显示</button>
|
|
528
|
+
<div class="usage-tips-tooltip" id="usageTipsTooltip" role="tooltip"></div>
|
|
529
|
+
</div>
|
|
530
|
+
|
|
517
531
|
<!-- 目标条(Goal mode):开关点亮后在输入框上方常驻;开关关闭时仅在有未结束目标时显示(提示可继续) -->
|
|
518
532
|
<div class="goal-bar" id="goalBar" style="display: none;">
|
|
519
533
|
<span class="goal-bar-icon" aria-hidden="true">🎯</span>
|
|
@@ -529,20 +543,6 @@
|
|
|
529
543
|
</div>
|
|
530
544
|
</div>
|
|
531
545
|
|
|
532
|
-
<!-- 使用技巧轮播条(参考 Trae IDE):无底色单行提示;悬停暂停轮播,上方浮出深色气泡显示全文 -->
|
|
533
|
-
<div class="usage-tips-bar" id="usageTipsBar" style="display: none;">
|
|
534
|
-
<span class="usage-tips-icon" aria-hidden="true">
|
|
535
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
536
|
-
<path d="M9 18h6"></path>
|
|
537
|
-
<path d="M10 21h4"></path>
|
|
538
|
-
<path d="M12 3a6 6 0 0 0-3.5 10.9c.6.4.9 1 .9 1.7V16h5.2v-.4c0-.7.3-1.3.9-1.7A6 6 0 0 0 12 3Z"></path>
|
|
539
|
-
</svg>
|
|
540
|
-
</span>
|
|
541
|
-
<span class="usage-tips-text" id="usageTipsText" aria-live="polite"></span>
|
|
542
|
-
<button class="usage-tips-dismiss" id="usageTipsDismiss" type="button" data-i18n="usageTips.dismiss">不再显示</button>
|
|
543
|
-
<div class="usage-tips-tooltip" id="usageTipsTooltip" role="tooltip"></div>
|
|
544
|
-
</div>
|
|
545
|
-
|
|
546
546
|
<div class="input-container">
|
|
547
547
|
<div class="input-bottom-row">
|
|
548
548
|
<div class="input-bottom-left">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-helper-agent",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.6",
|
|
4
4
|
"description": "AI Helper Agent - Local file access and system command execution proxy for Chrome extension / AI Helper 代理服务,为 Chrome 扩展提供本地文件读写和系统命令执行",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/server.js",
|