mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-16 15:39:47 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d03685ade | |||
| b305c386bc | |||
| 240dd7d314 | |||
| e737c4a611 | |||
| 2eec4f3639 |
@@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
||||||
"version": "1.37.0"
|
"version": "1.37.1"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
English | [中文](./CHANGELOG.zh.md)
|
English | [中文](./CHANGELOG.zh.md)
|
||||||
|
|
||||||
|
## 1.37.1 - 2026-02-27
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- `baoyu-danger-gemini-web`: sync model headers with upstream and update model list (by @xkcoding)
|
||||||
|
|
||||||
## 1.37.0 - 2026-02-27
|
## 1.37.0 - 2026-02-27
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
[English](./CHANGELOG.md) | 中文
|
[English](./CHANGELOG.md) | 中文
|
||||||
|
|
||||||
|
## 1.37.1 - 2026-02-27
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
- `baoyu-danger-gemini-web`:同步上游模型请求头并更新模型列表 (by @xkcoding)
|
||||||
|
|
||||||
## 1.37.0 - 2026-02-27
|
## 1.37.0 - 2026-02-27
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ test -f "$HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md" && echo "user"
|
|||||||
```bash
|
```bash
|
||||||
# Text generation
|
# Text generation
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts "Your prompt"
|
npx -y bun ${SKILL_DIR}/scripts/main.ts "Your prompt"
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Your prompt" --model gemini-2.5-pro
|
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Your prompt" --model gemini-3-flash
|
||||||
|
|
||||||
# Image generation
|
# Image generation
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cute cat" --image cat.png
|
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cute cat" --image cat.png
|
||||||
@@ -100,7 +100,7 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json
|
|||||||
|--------|-------------|
|
|--------|-------------|
|
||||||
| `--prompt`, `-p` | Prompt text |
|
| `--prompt`, `-p` | Prompt text |
|
||||||
| `--promptfiles` | Read prompt from files (concatenated) |
|
| `--promptfiles` | Read prompt from files (concatenated) |
|
||||||
| `--model`, `-m` | Model: gemini-3-pro (default), gemini-2.5-pro, gemini-2.5-flash |
|
| `--model`, `-m` | Model: gemini-3-pro (default), gemini-3-flash, gemini-3-flash-thinking, gemini-3.1-pro-preview |
|
||||||
| `--image [path]` | Generate image (default: generated.png) |
|
| `--image [path]` | Generate image (default: generated.png) |
|
||||||
| `--reference`, `--ref` | Reference images for vision input |
|
| `--reference`, `--ref` | Reference images for vision input |
|
||||||
| `--sessionId` | Session ID for multi-turn conversation |
|
| `--sessionId` | Session ID for multi-turn conversation |
|
||||||
@@ -114,9 +114,10 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json
|
|||||||
|
|
||||||
| Model | Description |
|
| Model | Description |
|
||||||
|-------|-------------|
|
|-------|-------------|
|
||||||
| `gemini-3-pro` | Default, latest |
|
| `gemini-3-pro` | Default, latest 3.0 Pro |
|
||||||
| `gemini-2.5-pro` | Previous pro |
|
| `gemini-3-flash` | Fast, lightweight 3.0 Flash |
|
||||||
| `gemini-2.5-flash` | Fast, lightweight |
|
| `gemini-3-flash-thinking` | 3.0 Flash with thinking |
|
||||||
|
| `gemini-3.1-pro-preview` | 3.1 Pro preview (empty header, auto-routed) |
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
|
|||||||
@@ -47,17 +47,22 @@ export class Model {
|
|||||||
static readonly UNSPECIFIED = new Model('unspecified', {}, false);
|
static readonly UNSPECIFIED = new Model('unspecified', {}, false);
|
||||||
static readonly G_3_0_PRO = new Model(
|
static readonly G_3_0_PRO = new Model(
|
||||||
'gemini-3.0-pro',
|
'gemini-3.0-pro',
|
||||||
{ 'x-goog-ext-525001261-jspb': '[1,null,null,null,"9d8ca3786ebdfbea",null,null,0,[4]]' },
|
{ 'x-goog-ext-525001261-jspb': '[1,null,null,null,"9d8ca3786ebdfbea",null,null,0,[4],null,null,1]' },
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
static readonly G_2_5_PRO = new Model(
|
static readonly G_3_0_FLASH = new Model(
|
||||||
'gemini-2.5-pro',
|
'gemini-3.0-flash',
|
||||||
{ 'x-goog-ext-525001261-jspb': '[1,null,null,null,"4af6c7f5da75d65d",null,null,0,[4]]' },
|
{ 'x-goog-ext-525001261-jspb': '[1,null,null,null,"fbb127bbb056c959",null,null,0,[4],null,null,1]' },
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
static readonly G_2_5_FLASH = new Model(
|
static readonly G_3_0_FLASH_THINKING = new Model(
|
||||||
'gemini-2.5-flash',
|
'gemini-3.0-flash-thinking',
|
||||||
{ 'x-goog-ext-525001261-jspb': '[1,null,null,null,"9ec249fc9ad08861",null,null,0,[4]]' },
|
{ 'x-goog-ext-525001261-jspb': '[1,null,null,null,"5bf011840784117a",null,null,0,[4],null,null,1]' },
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
static readonly G_3_1_PRO_PREVIEW = new Model(
|
||||||
|
'gemini-3.1-pro-preview',
|
||||||
|
{},
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -68,12 +73,12 @@ export class Model {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
static from_name(name: string): Model {
|
static from_name(name: string): Model {
|
||||||
for (const model of [Model.UNSPECIFIED, Model.G_3_0_PRO, Model.G_2_5_PRO, Model.G_2_5_FLASH]) {
|
for (const model of [Model.UNSPECIFIED, Model.G_3_0_PRO, Model.G_3_0_FLASH, Model.G_3_0_FLASH_THINKING, Model.G_3_1_PRO_PREVIEW]) {
|
||||||
if (model.model_name === name) return model;
|
if (model.model_name === name) return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unknown model name: ${name}. Available models: ${[Model.UNSPECIFIED, Model.G_3_0_PRO, Model.G_2_5_PRO, Model.G_2_5_FLASH]
|
`Unknown model name: ${name}. Available models: ${[Model.UNSPECIFIED, Model.G_3_0_PRO, Model.G_3_0_FLASH, Model.G_3_0_FLASH_THINKING, Model.G_3_1_PRO_PREVIEW]
|
||||||
.map((m) => m.model_name)
|
.map((m) => m.model_name)
|
||||||
.join(', ')}`,
|
.join(', ')}`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Multi-turn conversation (agent generates unique sessionId):
|
|||||||
Options:
|
Options:
|
||||||
-p, --prompt <text> Prompt text
|
-p, --prompt <text> Prompt text
|
||||||
--promptfiles <files...> Read prompt from one or more files (concatenated in order)
|
--promptfiles <files...> Read prompt from one or more files (concatenated in order)
|
||||||
-m, --model <id> gemini-3-pro | gemini-2.5-pro | gemini-2.5-flash (default: gemini-3-pro)
|
-m, --model <id> gemini-3-pro | gemini-3-flash | gemini-3-flash-thinking | gemini-3.1-pro-preview (default: gemini-3-pro)
|
||||||
--json Output JSON
|
--json Output JSON
|
||||||
--image [path] Generate an image and save it (default: ./generated.png)
|
--image [path] Generate an image and save it (default: ./generated.png)
|
||||||
--reference <files...> Reference images for vision input
|
--reference <files...> Reference images for vision input
|
||||||
@@ -227,8 +227,11 @@ function resolveModel(id: string): Model {
|
|||||||
const k = id.trim();
|
const k = id.trim();
|
||||||
if (k === 'gemini-3-pro') return Model.G_3_0_PRO;
|
if (k === 'gemini-3-pro') return Model.G_3_0_PRO;
|
||||||
if (k === 'gemini-3.0-pro') return Model.G_3_0_PRO;
|
if (k === 'gemini-3.0-pro') return Model.G_3_0_PRO;
|
||||||
if (k === 'gemini-2.5-pro') return Model.G_2_5_PRO;
|
if (k === 'gemini-3-flash') return Model.G_3_0_FLASH;
|
||||||
if (k === 'gemini-2.5-flash') return Model.G_2_5_FLASH;
|
if (k === 'gemini-3.0-flash') return Model.G_3_0_FLASH;
|
||||||
|
if (k === 'gemini-3-flash-thinking') return Model.G_3_0_FLASH_THINKING;
|
||||||
|
if (k === 'gemini-3.0-flash-thinking') return Model.G_3_0_FLASH_THINKING;
|
||||||
|
if (k === 'gemini-3.1-pro-preview') return Model.G_3_1_PRO_PREVIEW;
|
||||||
return Model.from_name(k);
|
return Model.from_name(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user