fix(dashboard): fix _renderNextStepCard this.plugin is undefined

- Replace this.plugin with this.app.plugins.plugins['paperforge']
- PaperForgeStatusView does not have a plugin property
- Remove debug console.log lines
This commit is contained in:
Research Assistant 2026-05-10 17:12:22 +08:00
parent b31d5e94d9
commit f9fbbfb2f0

View file

@ -1530,11 +1530,9 @@ class PaperForgeStatusView extends ItemView {
const lastSlash = entry.note_path.lastIndexOf('/');
const wsDir = lastSlash !== -1 ? entry.note_path.substring(0, lastSlash) : '.';
const discPath = wsDir + '/ai/discussion.json';
console.log('PaperForge: looking for discussion at', discPath);
// Use Obsidian adapter for path correctness (handles unicode reliably)
this.app.vault.adapter.exists(discPath).then((exists) => {
console.log('PaperForge: discussion exists?', exists);
if (!exists) return;
return this.app.vault.adapter.read(discPath);
}).then((raw) => {
@ -1694,7 +1692,7 @@ class PaperForgeStatusView extends ItemView {
});
// Show "Run in [agent_platform]" label below the button (DASH-02)
const platform = this.plugin.settings?.agent_platform || 'opencode';
const platform = this.app.plugins.plugins['paperforge']?.settings?.agent_platform || 'opencode';
const labelEl = card.createEl('div', { cls: 'paperforge-agent-platform-label' });
labelEl.setText(t('run_in_agent').replace('{0}', platform));
} else if (nextStep === 'ready') {