pi-models-discovery 1.2.0 → 1.3.0
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/package.json +2 -2
- package/src/index.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-models-discovery",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Pi extension: discover models from {baseUrl}/models for providers marked with discoverModels in models.json",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@earendil-works/pi-coding-agent": ">=0.80.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"pi-extensions-i18n": "^0.
|
|
60
|
+
"pi-extensions-i18n": "^0.6.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@earendil-works/pi-ai": "0.85.1",
|
package/src/index.ts
CHANGED
|
@@ -48,7 +48,7 @@ import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
|
48
48
|
import type { ExtensionAPI, ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
49
49
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
50
50
|
import { dirname, join } from "node:path";
|
|
51
|
-
import { createTranslator, loadCatalog, notifyWithSource, type NoticeColor, type NoticeSource } from "pi-extensions-i18n";
|
|
51
|
+
import { createTranslator, installNoticeRenderer, loadCatalog, notifyWithSource, type NoticeColor, type NoticeSource } from "pi-extensions-i18n";
|
|
52
52
|
|
|
53
53
|
const i18n = createTranslator(loadCatalog(new URL("../locales/index.json", import.meta.url)));
|
|
54
54
|
|
|
@@ -677,6 +677,8 @@ async function manageProviderFlow(
|
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
export default async function (pi: ExtensionAPI) {
|
|
680
|
+
// 提示画成会话区里的带底色消息块;渲染器在本包这个模块实例里注册一次。
|
|
681
|
+
installNoticeRenderer(pi);
|
|
680
682
|
// 加载期没有 ctx,消息统一收集,session_start 时 flush(运行期后续追加的也会在下个 session 补发)
|
|
681
683
|
const pendingNotices: Notice[] = [];
|
|
682
684
|
// 有 UI 时走统一来源包装;无 UI 时退到日志前缀,不静默丢掉提示
|