feat: Add built-in version tracking to bd (bd-loka)
Implement automatic bd version tracking and upgrade awareness: - Add LastBdVersion field to Config struct in metadata.json - Auto-update version on every bd command in PersistentPreRun - Add 'bd upgrade' command with status/review/ack subcommands - Show upgrade notifications on 'bd ready' and 'bd list' - Non-intrusive: only shows once per session, skipped for JSON output The system tracks version changes automatically and helps users stay aware of bd upgrades without manual intervention. Notifications are graceful - failures don't break commands. Example output on bd ready after upgrade: 🔄 bd upgraded from v0.22.0 to v0.24.2 since last use 💡 Run 'bd upgrade review' to see what changed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -83,6 +83,11 @@ var (
|
||||
|
||||
// Auto-import state
|
||||
autoImportEnabled = true // Can be disabled with --no-auto-import
|
||||
|
||||
// Version upgrade tracking (bd-loka)
|
||||
versionUpgradeDetected = false // Set to true if bd version changed since last run
|
||||
previousVersion = "" // The last bd version user had (empty = first run or unknown)
|
||||
upgradeAcknowledged = false // Set to true after showing upgrade notification once per session
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -293,6 +298,10 @@ var rootCmd = &cobra.Command{
|
||||
}
|
||||
}
|
||||
|
||||
// Track bd version changes (bd-loka)
|
||||
// Best-effort tracking - failures are silent
|
||||
trackBdVersion()
|
||||
|
||||
// Initialize daemon status
|
||||
socketPath := getSocketPath()
|
||||
daemonStatus = DaemonStatus{
|
||||
|
||||
Reference in New Issue
Block a user