@0xmaxma/claude-gateway 1.2.23 → 1.2.31
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/config.template.json +2 -1
- package/dist/agent/runner.d.ts +3 -2
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +55 -36
- package/dist/agent/runner.js.map +1 -1
- package/dist/api/packages.js +1 -1
- package/dist/api/packages.js.map +1 -1
- package/dist/api/router.d.ts.map +1 -1
- package/dist/api/router.js +45 -11
- package/dist/api/router.js.map +1 -1
- package/dist/apps/socket-server.d.ts.map +1 -1
- package/dist/apps/socket-server.js +21 -11
- package/dist/apps/socket-server.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +5 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/migrator.d.ts +14 -1
- package/dist/config/migrator.d.ts.map +1 -1
- package/dist/config/migrator.js +97 -1
- package/dist/config/migrator.js.map +1 -1
- package/dist/history/db.d.ts +1 -1
- package/dist/history/db.d.ts.map +1 -1
- package/dist/history/db.js +10 -3
- package/dist/history/db.js.map +1 -1
- package/dist/history/types.d.ts +1 -0
- package/dist/history/types.d.ts.map +1 -1
- package/dist/index.js +73 -16
- package/dist/index.js.map +1 -1
- package/mcp/tools/telegram/receiver-server.ts +17 -8
- package/package.json +1 -1
|
@@ -975,16 +975,25 @@ bot.command('models', async ctx => {
|
|
|
975
975
|
if (!CALLBACK_URL_BASE) return
|
|
976
976
|
|
|
977
977
|
try {
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
978
|
+
const [modelRes, modelsRes] = await Promise.all([
|
|
979
|
+
fetch(CALLBACK_URL_BASE + '/command', {
|
|
980
|
+
method: 'POST',
|
|
981
|
+
headers: { 'Content-Type': 'application/json' },
|
|
982
|
+
body: JSON.stringify({ command: 'get_model', chat_id: String(ctx.chat.id) }),
|
|
983
|
+
}),
|
|
984
|
+
fetch(CALLBACK_URL_BASE + '/command', {
|
|
985
|
+
method: 'POST',
|
|
986
|
+
headers: { 'Content-Type': 'application/json' },
|
|
987
|
+
body: JSON.stringify({ command: 'get_models' }),
|
|
988
|
+
}),
|
|
989
|
+
])
|
|
990
|
+
const modelData = (await modelRes.json()) as { model?: string }
|
|
991
|
+
const modelsData = (await modelsRes.json()) as { models?: { id: string; label: string }[] }
|
|
992
|
+
const currentModel = modelData.model ?? ''
|
|
993
|
+
const availableModels = modelsData.models ?? AVAILABLE_MODELS
|
|
985
994
|
|
|
986
995
|
const keyboard = new InlineKeyboard()
|
|
987
|
-
for (const m of
|
|
996
|
+
for (const m of availableModels) {
|
|
988
997
|
const prefix = m.id === currentModel ? '\u2705 ' : ''
|
|
989
998
|
keyboard.text(`${prefix}${m.label}`, `model:${m.id}`).row()
|
|
990
999
|
}
|