@make-u-free/migi 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. package/bin/migi.js +22 -0
  2. package/package.json +1 -1
package/bin/migi.js CHANGED
@@ -79,6 +79,28 @@ function prompt() {
79
79
  return prompt()
80
80
  }
81
81
 
82
+ if (input === '/models') {
83
+ try {
84
+ console.log(chalk.dim('\n 利用可能なモデルを取得中...\n'))
85
+ const OpenAI = (await import('openai')).default
86
+ const client = new OpenAI({ apiKey })
87
+ const res = await client.models.list()
88
+ const models = res.data
89
+ .map(m => m.id)
90
+ .filter(id => id.includes('gpt') || id.includes('o1') || id.includes('o3') || id.includes('o4'))
91
+ .sort()
92
+ console.log(chalk.cyan(' 利用可能なモデル:'))
93
+ for (const m of models) {
94
+ const mark = m === model ? chalk.green(' ← 現在') : ''
95
+ console.log(chalk.dim(` • ${m}`) + mark)
96
+ }
97
+ console.log(chalk.dim('\n /config でモデルを変更できます。\n'))
98
+ } catch (err) {
99
+ console.error(chalk.red('\n 取得失敗: ' + err.message + '\n'))
100
+ }
101
+ return prompt()
102
+ }
103
+
82
104
  // --- スキルルーティング ---
83
105
  const parsed = parseSkillInput(input)
84
106
  if (parsed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@make-u-free/migi",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Your AI right-hand agent. Works anywhere, with any LLM API.",
5
5
  "type": "module",
6
6
  "bin": {