mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 14:43:05 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-14T18:37:00Z - Changes: 3 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c85a6b798
commit
efda5e91ca
3 files changed
+27
-3
No files matched your search
@@ -51,7 +51,7 @@ const c = {
|
||||
function getUserInfo() {
|
||||
let name = 'user';
|
||||
let gitBranch = '';
|
||||
let modelName = 'Opus 4.5';
|
||||
let modelName = 'Unknown';
|
||||
|
||||
try {
|
||||
name = execSync('git config user.name 2>/dev/null || echo "user"', { encoding: 'utf-8' }).trim();
|
||||
@@ -60,6 +60,30 @@ function getUserInfo() {
|
||||
// Ignore errors
|
||||
}
|
||||
|
||||
// Auto-detect model from Claude Code's config
|
||||
try {
|
||||
const homedir = require('os').homedir();
|
||||
const claudeConfigPath = path.join(homedir, '.claude.json');
|
||||
if (fs.existsSync(claudeConfigPath)) {
|
||||
const claudeConfig = JSON.parse(fs.readFileSync(claudeConfigPath, 'utf-8'));
|
||||
// Get model from lastModelUsage (most recent model used)
|
||||
const lastModelUsage = claudeConfig.projects?.[process.cwd()]?.lastModelUsage || claudeConfig.lastModelUsage;
|
||||
if (lastModelUsage) {
|
||||
const modelIds = Object.keys(lastModelUsage);
|
||||
if (modelIds.length > 0) {
|
||||
const modelId = modelIds[0]; // Get most recent
|
||||
// Parse model ID to human-readable name
|
||||
if (modelId.includes('opus')) modelName = 'Opus 4.5';
|
||||
else if (modelId.includes('sonnet')) modelName = 'Sonnet 4';
|
||||
else if (modelId.includes('haiku')) modelName = 'Haiku 4.5';
|
||||
else modelName = modelId.split('-').slice(1, 3).join(' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// Fallback to Unknown if can't read config
|
||||
}
|
||||
|
||||
return { name, gitBranch, modelName };
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@claude-flow/cli",
|
||||
"version": "3.0.0-alpha.104",
|
||||
"version": "3.0.0-alpha.105",
|
||||
"type": "module",
|
||||
"description": "CLI module - command parsing, prompts, output formatting",
|
||||
"main": "dist/src/index.js",
|
||||
|
||||
Generated
+1
-1
@@ -925,7 +925,7 @@
|
||||
}
|
||||
},
|
||||
"@claude-flow/cli": {
|
||||
"version": "3.0.0-alpha.103",
|
||||
"version": "3.0.0-alpha.105",
|
||||
"dependencies": {
|
||||
"@claude-flow/aidefence": "^3.0.2",
|
||||
"@claude-flow/embeddings": "^3.0.0-alpha.12",
|
||||
|
||||
Reference in new issue
Block a user