ai-helper-agent 2.6.2 → 2.6.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.
Files changed (80) hide show
  1. package/dist/assets/{agent-store-xMTBHsla.js → agent-store-DR_A4rFm.js} +1 -1
  2. package/dist/assets/background.js +1 -1
  3. package/dist/assets/{chat-export-Co9I1mr6.js → chat-export-pxivPZ1I.js} +1 -1
  4. package/dist/assets/content.js +4 -4
  5. package/dist/{dist/assets/i18n-D19lS40q.js → assets/i18n-DkFO10iz.js} +4 -4
  6. package/dist/{dist/assets/markdown-render-73aUwmjo.js → assets/markdown-render-BG-l7OC_.js} +3 -3
  7. package/dist/assets/{model-profiles-CNilkaQS.js → model-profiles-CWaNLvr9.js} +1 -1
  8. package/dist/{dist/assets/options-o37xKbep.css → assets/options-Bah2BHqG.css} +1 -1
  9. package/dist/assets/options.js +89 -89
  10. package/dist/assets/{page-snapshot-renderer-PbM4zRTp.js → page-snapshot-renderer-CxdcddId.js} +1 -1
  11. package/dist/assets/{session-store-C5M7aiQR.js → session-store-CgGSFTQs.js} +3 -3
  12. package/dist/assets/side_panel.css +1 -1
  13. package/dist/assets/side_panel.js +159 -152
  14. package/dist/assets/{utils-DNJJTC8N.js → utils-D0eYGnHb.js} +1 -1
  15. package/dist/assets/{version-a-Z0n4U9.js → version-1U0wZbLN.js} +1 -1
  16. package/dist/assets/{workspace-manager-CovVLj3v.js → workspace-manager-BtQbbwPc.js} +1 -1
  17. package/dist/manifest.json +1 -1
  18. package/dist/offscreen/offscreen.js +6 -6
  19. package/dist/options.html +8 -6
  20. package/dist/side_panel.html +8 -8
  21. package/package.json +1 -1
  22. package/src/directory-picker.js +23 -3
  23. package/src/locales/en.json +0 -1
  24. package/src/locales/zh.json +0 -1
  25. package/src/server.js +7 -7
  26. package/dist/assets/i18n-D19lS40q.js +0 -49
  27. package/dist/assets/markdown-render-DLqO_8KG.js +0 -63
  28. package/dist/assets/options-o37xKbep.css +0 -1
  29. package/dist/dist/_locales/en/messages.json +0 -11
  30. package/dist/dist/_locales/zh_CN/messages.json +0 -11
  31. package/dist/dist/assets/__vite-browser-external-CM3Eme-n.js +0 -1
  32. package/dist/dist/assets/agent-store-xMTBHsla.js +0 -1
  33. package/dist/dist/assets/background.js +0 -452
  34. package/dist/dist/assets/chat-export-Bm0oW0MA.js +0 -37
  35. package/dist/dist/assets/chunk-CMxvf4Kt.js +0 -1
  36. package/dist/dist/assets/content.js +0 -985
  37. package/dist/dist/assets/dist-BUuoW_84.js +0 -24
  38. package/dist/dist/assets/dist-DuuG_8Br.js +0 -133
  39. package/dist/dist/assets/jszip.min-DO6SOhXU.js +0 -2
  40. package/dist/dist/assets/lib-YwkWjNcC.js +0 -220
  41. package/dist/dist/assets/marked.min.js-D2rXgLAQ.js +0 -56
  42. package/dist/dist/assets/marked.min.js-loader-tKH5SQVQ.js +0 -13
  43. package/dist/dist/assets/model-profiles-CNilkaQS.js +0 -24
  44. package/dist/dist/assets/network-scope-CNRYXk74.js +0 -1
  45. package/dist/dist/assets/options.js +0 -859
  46. package/dist/dist/assets/page-snapshot-renderer-PbM4zRTp.js +0 -3
  47. package/dist/dist/assets/pdf-DnVqBaAN.js +0 -6
  48. package/dist/dist/assets/session-store-C5M7aiQR.js +0 -81
  49. package/dist/dist/assets/side_panel.css +0 -1
  50. package/dist/dist/assets/side_panel.js +0 -2599
  51. package/dist/dist/assets/theme-BRAX5X2F.css +0 -1
  52. package/dist/dist/assets/theme-CLwYsx9o.js +0 -1
  53. package/dist/dist/assets/utils-DNJJTC8N.js +0 -112
  54. package/dist/dist/assets/version-CIqrX-s2.js +0 -1
  55. package/dist/dist/assets/voice-shortcut-Dtt3nhkz.js +0 -1
  56. package/dist/dist/assets/workspace-manager-CovVLj3v.js +0 -1
  57. package/dist/dist/assets/xlsx-DGkz7cnk.js +0 -105
  58. package/dist/dist/icons/README.md +0 -11
  59. package/dist/dist/icons/design-philosophy.md +0 -41
  60. package/dist/dist/icons/icon128.png +0 -0
  61. package/dist/dist/icons/icon128.svg +0 -68
  62. package/dist/dist/icons/icon16.png +0 -0
  63. package/dist/dist/icons/icon16.svg +0 -32
  64. package/dist/dist/icons/icon48.png +0 -0
  65. package/dist/dist/icons/icon48.svg +0 -56
  66. package/dist/dist/libs/github-markdown-light.min.css +0 -8
  67. package/dist/dist/libs/html2canvas.min.js +0 -20
  68. package/dist/dist/libs/jspdf.min.js +0 -398
  69. package/dist/dist/libs/marked.min.js +0 -69
  70. package/dist/dist/libs/mermaid.min.js +0 -2024
  71. package/dist/dist/libs/pdf.worker.min.js +0 -22
  72. package/dist/dist/libs/qrcode.min.js +0 -7
  73. package/dist/dist/manifest.json +0 -94
  74. package/dist/dist/offscreen/offscreen.html +0 -11
  75. package/dist/dist/offscreen/offscreen.js +0 -49
  76. package/dist/dist/options.html +0 -1143
  77. package/dist/dist/service-worker-loader.js +0 -1
  78. package/dist/dist/side_panel.html +0 -1366
  79. package/dist/dist/styles/styles.css +0 -262
  80. package/dist/dist/voice-capture-worklet.js +0 -47
@@ -1,262 +0,0 @@
1
- /* AI Helper 浮框样式 */
2
-
3
- #ai-helper-floating-box {
4
- width: 500px;
5
- max-width: 90vw;
6
- max-height: 70vh;
7
- background: #ffffff;
8
- border: 1px solid #e0e0e0;
9
- border-radius: 12px;
10
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
11
- display: flex;
12
- flex-direction: column;
13
- overflow: hidden;
14
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
15
- font-size: 14px;
16
- line-height: 1.6;
17
- color: #333;
18
- z-index: 999999;
19
- transition: box-shadow 0.3s ease;
20
- }
21
-
22
- #ai-helper-floating-box:hover {
23
- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
24
- }
25
-
26
- /* 头部样式 */
27
- .ai-helper-header {
28
- display: flex;
29
- justify-content: space-between;
30
- align-items: center;
31
- padding: 12px 16px;
32
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
33
- color: white;
34
- cursor: grab;
35
- user-select: none;
36
- }
37
-
38
- .ai-helper-header:active {
39
- cursor: grabbing;
40
- }
41
-
42
- .ai-helper-title {
43
- display: flex;
44
- align-items: center;
45
- gap: 8px;
46
- font-weight: 600;
47
- font-size: 15px;
48
- }
49
-
50
- .ai-helper-icon {
51
- font-size: 18px;
52
- }
53
-
54
- .ai-helper-actions {
55
- display: flex;
56
- gap: 6px;
57
- }
58
-
59
- .ai-helper-btn {
60
- background: rgba(255, 255, 255, 0.2);
61
- border: none;
62
- color: white;
63
- width: 28px;
64
- height: 28px;
65
- border-radius: 6px;
66
- cursor: pointer;
67
- font-size: 14px;
68
- display: flex;
69
- align-items: center;
70
- justify-content: center;
71
- transition: background 0.2s;
72
- }
73
-
74
- .ai-helper-btn:hover {
75
- background: rgba(255, 255, 255, 0.35);
76
- }
77
-
78
- /* 主体样式 */
79
- .ai-helper-body {
80
- flex: 1;
81
- overflow-y: auto;
82
- padding: 16px;
83
- min-height: 200px;
84
- max-height: 50vh;
85
- }
86
-
87
- .ai-helper-body::-webkit-scrollbar {
88
- width: 6px;
89
- }
90
-
91
- .ai-helper-body::-webkit-scrollbar-track {
92
- background: transparent;
93
- }
94
-
95
- .ai-helper-body::-webkit-scrollbar-thumb {
96
- background: #c0c0c0;
97
- border-radius: 3px;
98
- }
99
-
100
- .ai-helper-body::-webkit-scrollbar-thumb:hover {
101
- background: #a0a0a0;
102
- }
103
-
104
- /* 加载动画 */
105
- .ai-helper-loading {
106
- display: flex;
107
- flex-direction: column;
108
- align-items: center;
109
- justify-content: center;
110
- gap: 12px;
111
- color: #888;
112
- padding: 40px 20px;
113
- }
114
-
115
- .ai-helper-spinner {
116
- width: 32px;
117
- height: 32px;
118
- border: 3px solid #e0e0e0;
119
- border-top-color: #667eea;
120
- border-radius: 50%;
121
- animation: ai-helper-spin 0.8s linear infinite;
122
- }
123
-
124
- @keyframes ai-helper-spin {
125
- to {
126
- transform: rotate(360deg);
127
- }
128
- }
129
-
130
- /* 输入模式 */
131
- .ai-helper-input-container {
132
- display: flex;
133
- flex-direction: column;
134
- gap: 12px;
135
- }
136
-
137
- #ai-helper-input {
138
- width: 100%;
139
- padding: 12px;
140
- border: 1px solid #e0e0e0;
141
- border-radius: 8px;
142
- font-size: 14px;
143
- font-family: inherit;
144
- resize: vertical;
145
- outline: none;
146
- transition: border-color 0.2s;
147
- box-sizing: border-box;
148
- }
149
-
150
- #ai-helper-input:focus {
151
- border-color: #667eea;
152
- box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
153
- }
154
-
155
- .ai-helper-submit-btn {
156
- padding: 10px 24px;
157
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
158
- color: white;
159
- border: none;
160
- border-radius: 8px;
161
- font-size: 14px;
162
- font-weight: 500;
163
- cursor: pointer;
164
- transition: transform 0.1s, box-shadow 0.2s;
165
- }
166
-
167
- .ai-helper-submit-btn:hover {
168
- transform: translateY(-1px);
169
- box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
170
- }
171
-
172
- .ai-helper-submit-btn:active {
173
- transform: translateY(0);
174
- }
175
-
176
- /* 结果内容 */
177
- .ai-helper-result {
178
- line-height: 1.7;
179
- word-wrap: break-word;
180
- overflow-wrap: break-word;
181
- }
182
-
183
- .ai-helper-result pre {
184
- background: #f5f5f5;
185
- border: 1px solid #e0e0e0;
186
- border-radius: 6px;
187
- padding: 12px;
188
- overflow-x: auto;
189
- margin: 12px 0;
190
- }
191
-
192
- .ai-helper-result code {
193
- background: #f0f0f0;
194
- padding: 2px 6px;
195
- border-radius: 4px;
196
- font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
197
- font-size: 13px;
198
- color: #e83e8c;
199
- }
200
-
201
- .ai-helper-result pre code {
202
- background: none;
203
- padding: 0;
204
- color: inherit;
205
- }
206
-
207
- .ai-helper-result strong {
208
- color: #333;
209
- font-weight: 600;
210
- }
211
-
212
- .ai-helper-result em {
213
- color: #555;
214
- font-style: italic;
215
- }
216
-
217
- /* 错误样式 */
218
- .ai-helper-error {
219
- color: #e53e3e;
220
- font-weight: 500;
221
- }
222
-
223
- /* 底部状态栏 */
224
- .ai-helper-footer {
225
- padding: 8px 16px;
226
- background: #f8f9fa;
227
- border-top: 1px solid #e9ecef;
228
- font-size: 12px;
229
- color: #888;
230
- }
231
-
232
- .ai-helper-status {
233
- display: flex;
234
- align-items: center;
235
- gap: 6px;
236
- }
237
-
238
- .ai-helper-status::before {
239
- content: '';
240
- width: 8px;
241
- height: 8px;
242
- border-radius: 50%;
243
- background: #48bb78;
244
- }
245
-
246
- .ai-helper-status.generating::before {
247
- background: #ed8936;
248
- animation: ai-helper-pulse 1s ease-in-out infinite;
249
- }
250
-
251
- .ai-helper-status.error::before {
252
- background: #e53e3e;
253
- }
254
-
255
- @keyframes ai-helper-pulse {
256
- 0%, 100% {
257
- opacity: 1;
258
- }
259
- 50% {
260
- opacity: 0.4;
261
- }
262
- }
@@ -1,47 +0,0 @@
1
- // side_panel/voice-capture-worklet.js - 录音采集 AudioWorklet 处理器
2
- //
3
- // 职责:收 Float32 输入 → 累积 1600 样本(@16k ≈ 100ms)→ 转 Int16 → 转移所有权回主线程。
4
- // 说明:
5
- // - 该文件不参与 esbuild 打包,由 scripts/fix-build.js 直接复制到 dist/ 根;
6
- // 面板按 ['voice-capture-worklet.js', 'dist/voice-capture-worklet.js'] 依次探测
7
- // (安装形态不同,扩展根也不同:装 dist 时在根,源码形态下在 dist/ 子目录),
8
- // 加载走 chrome.runtime.getURL(CSP 禁止 blob:);
9
- // - 顺带算 RMS 回传,供录音条波形与「没有听到声音」判定使用,避免主线程重复遍历。
10
-
11
- class VoiceCaptureProcessor extends AudioWorkletProcessor {
12
- constructor() {
13
- super();
14
- this.frameSize = 1600; // 100ms @ 16kHz
15
- this.buf = new Float32Array(this.frameSize);
16
- this.n = 0;
17
- this.rmsAcc = 0;
18
- }
19
-
20
- process(inputs) {
21
- const input = inputs[0];
22
- const channel = input && input[0];
23
- if (!channel || channel.length === 0) return true;
24
-
25
- for (let i = 0; i < channel.length; i++) {
26
- const sample = channel[i];
27
- this.rmsAcc += sample * sample;
28
- this.buf[this.n++] = sample;
29
-
30
- if (this.n >= this.frameSize) {
31
- const pcm = new Int16Array(this.frameSize);
32
- for (let j = 0; j < this.frameSize; j++) {
33
- const v = this.buf[j] < -1 ? -1 : this.buf[j] > 1 ? 1 : this.buf[j];
34
- pcm[j] = v < 0 ? v * 0x8000 : v * 0x7fff;
35
- }
36
- const rms = Math.sqrt(this.rmsAcc / this.frameSize);
37
- this.rmsAcc = 0;
38
- this.n = 0;
39
- const buf = pcm.buffer;
40
- this.port.postMessage({ type: 'chunk', pcm: buf, rms }, [buf]);
41
- }
42
- }
43
- return true;
44
- }
45
- }
46
-
47
- registerProcessor('voice-capture', VoiceCaptureProcessor);