refactor(plugin): remove metadata assertions
Guard optional plugin metadata and pane identifiers before passing them to cleanup and warning paths. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -16,7 +16,7 @@ export function logLegacyPluginStartupWarning(deps: LogLegacyPluginStartupWarnin
|
||||
const migrateLegacyPluginEntryFn = deps.migrateLegacyPluginEntry ?? migrateLegacyPluginEntry
|
||||
|
||||
const result = checkForLegacyPluginEntryFn()
|
||||
if (!result.hasLegacyEntry) {
|
||||
if (!result.hasLegacyEntry || !result.configPath) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export function logLegacyPluginStartupWarning(deps: LogLegacyPluginStartupWarnin
|
||||
+ ` Attempting auto-migration...`,
|
||||
)
|
||||
|
||||
const migrated = migrateLegacyPluginEntryFn(result.configPath!)
|
||||
const migrated = migrateLegacyPluginEntryFn(result.configPath)
|
||||
if (migrated) {
|
||||
console.warn(`[oh-my-openagent] Auto-migrated opencode.json: ${result.legacyEntries.join(", ")} -> ${suggestedEntries.join(", ")}`)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user