@jaybon24/plugin-moonshot 0.0.2 → 0.0.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.
- package/dist/_assets/icon_s_en.svg +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="24" height="24" rx="6" fill="#1E1E1E"/>
|
|
3
|
+
<path d="M12 4C11.4477 4 11 4.44772 11 5V7C11 7.55228 11.4477 8 12 8C12.5523 8 13 7.55228 13 7V5C13 4.44772 12.5523 4 12 4Z" fill="white"/>
|
|
4
|
+
<path d="M12 16C11.4477 16 11 16.4477 11 17V19C11 19.5523 11.4477 20 12 20C12.5523 20 13 19.5523 13 19V17C13 16.4477 12.5523 16 12 16Z" fill="white"/>
|
|
5
|
+
<path d="M7 12C7 11.4477 6.55228 11 6 11H4C3.44772 11 3 11.4477 3 12C3 12.5523 3.44772 13 4 13H6C6.55228 13 7 12.5523 7 12Z" fill="white"/>
|
|
6
|
+
<path d="M20 11C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H18C17.4477 13 17 12.5523 17 12C17 11.4477 17.4477 11 18 11H20Z" fill="white"/>
|
|
7
|
+
<circle cx="12" cy="12" r="3" fill="white"/>
|
|
8
|
+
</svg>
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAwBxD,QAAA,MAAM,MAAM,EAAE,WAAW,CAAC,GAAG,CA2B5B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,12 @@ import { readFileSync } from 'fs';
|
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
3
|
import { dirname, join } from 'path';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { SvgIcon } from './types.js';
|
|
6
5
|
import { MoonshotModule } from './moonshot.module.js';
|
|
7
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
7
|
const __dirname = dirname(__filename);
|
|
8
|
+
// Read PNG icon as data URL. No fallback/try-catch: missing asset should fail fast.
|
|
9
|
+
const iconPngDataUrl = 'data:image/png;base64,' +
|
|
10
|
+
readFileSync(join(__dirname, '_assets/icon_s_en.png')).toString('base64');
|
|
9
11
|
const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'));
|
|
10
12
|
const ConfigSchema = z.object({});
|
|
11
13
|
const plugin = {
|
|
@@ -14,8 +16,8 @@ const plugin = {
|
|
|
14
16
|
version: packageJson.version,
|
|
15
17
|
category: 'model',
|
|
16
18
|
icon: {
|
|
17
|
-
type: '
|
|
18
|
-
value:
|
|
19
|
+
type: 'image',
|
|
20
|
+
value: iconPngDataUrl,
|
|
19
21
|
},
|
|
20
22
|
displayName: 'Moonshot AI (Kimi)',
|
|
21
23
|
description: 'Provide Moonshot AI (Kimi) Models with Long Context Support',
|