mongoose 7.8.10 → 7.8.12
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/deno.lock +61 -0
- package/dist/browser.umd.js +1 -1
- package/lib/query.js +9 -11
- package/lib/utils.js +2 -2
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -7
- package/16282.diff +0 -643
- package/gh-16033.ts +0 -35
- package/startmdb.mjs +0 -19
- package/step1.mjs +0 -44
package/step1.mjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { tool } from 'ai';
|
|
2
|
-
import { execFile } from 'node:child_process';
|
|
3
|
-
import { promisify } from 'node:util';
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
|
|
6
|
-
const execFileAsync = promisify(execFile);
|
|
7
|
-
|
|
8
|
-
async function run(command, args) {
|
|
9
|
-
const { stdout } = await execFileAsync(command, args);
|
|
10
|
-
return stdout.trim();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function logToolCall(name, preview) {
|
|
14
|
-
console.log(`\n> ${name} ${preview}`);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const git = tool({
|
|
18
|
-
description: 'Run a git command like log or diff',
|
|
19
|
-
inputSchema: z.object({
|
|
20
|
-
subcommand: z.enum(['log', 'diff', 'show']),
|
|
21
|
-
args: z.array(z.string()).default([])
|
|
22
|
-
}),
|
|
23
|
-
execute: async({ subcommand, args }) => {
|
|
24
|
-
logToolCall('git', [subcommand, ...args].join(' '));
|
|
25
|
-
return run('git', [subcommand, ...args]);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
import { generateText, stepCountIs } from 'ai';
|
|
30
|
-
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
31
|
-
|
|
32
|
-
const google = createGoogleGenerativeAI({
|
|
33
|
-
apiKey: process.env.GEMINI_API_KEY
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const result = await generateText({
|
|
37
|
-
model: google('gemini-2.5-flash'),
|
|
38
|
-
stopWhen: stepCountIs(10),
|
|
39
|
-
system: 'Summarize recent git commits into a concise changelog entry. Focus on user-facing changes.',
|
|
40
|
-
prompt: 'Summarize the last 20 commits',
|
|
41
|
-
tools: { git }
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
console.log(result.text);
|