chrome-ai-bridge 1.0.15 → 1.0.16
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.
|
@@ -279,7 +279,18 @@ export const askGeminiWeb = defineTool({
|
|
|
279
279
|
await textbox.click({ clickCount: 3 }); // Triple-click to select all
|
|
280
280
|
await page.keyboard.press('Backspace'); // Clear selection
|
|
281
281
|
// Type the question using real keyboard events (essential for Angular)
|
|
282
|
-
|
|
282
|
+
// IMPORTANT: Split by newlines and use Shift+Enter for line breaks
|
|
283
|
+
// (Enter alone triggers send in Gemini)
|
|
284
|
+
const lines = sanitizedQuestion.split('\n');
|
|
285
|
+
for (let i = 0; i < lines.length; i++) {
|
|
286
|
+
if (i > 0) {
|
|
287
|
+
// Shift+Enter for newline (Enter alone sends the message)
|
|
288
|
+
await page.keyboard.down('Shift');
|
|
289
|
+
await page.keyboard.press('Enter');
|
|
290
|
+
await page.keyboard.up('Shift');
|
|
291
|
+
}
|
|
292
|
+
await page.keyboard.type(lines[i], { delay: 2 });
|
|
293
|
+
}
|
|
283
294
|
// Wait for Angular to process the input and show send button
|
|
284
295
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
285
296
|
// 質問送信前に model-response 要素数を記録(ChatGPTと同じカウント方式)
|
package/package.json
CHANGED