mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-14T18:37:44Z - Changes: 1 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
f7ee17eae5
commit
a52eddaa2c
1 file changed
+12
-2
@@ -86,8 +86,18 @@ function getUserInfo() {
|
||||
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;
|
||||
// Try to find lastModelUsage - check current dir and parent dirs
|
||||
let lastModelUsage = null;
|
||||
const cwd = process.cwd();
|
||||
if (claudeConfig.projects) {
|
||||
// Try exact match first, then check if cwd starts with any project path
|
||||
for (const [projectPath, projectConfig] of Object.entries(claudeConfig.projects)) {
|
||||
if (cwd === projectPath || cwd.startsWith(projectPath + '/')) {
|
||||
lastModelUsage = projectConfig.lastModelUsage;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lastModelUsage) {
|
||||
const modelIds = Object.keys(lastModelUsage);
|
||||
if (modelIds.length > 0) {
|
||||
|
||||
Reference in new issue
Block a user