subagent thinking accordion; indicator fixes; script details & edit

This commit is contained in:
2026-04-20 15:09:37 -04:00
parent a188268906
commit b1d4459809
25 changed files with 2041 additions and 174 deletions

View File

@@ -32,19 +32,10 @@ let symbolWatcher: WatchStopHandle | null = null
const maybeInitChart = () => {
if (chartInitialized || !chartContainer.value) return
if (!chartStore.symbol) {
// Defer until backend provides a symbol
if (!symbolWatcher) {
symbolWatcher = watch(() => chartStore.symbol, (sym) => {
if (sym) {
symbolWatcher?.()
symbolWatcher = null
maybeInitChart()
}
})
}
return
}
// If the workspace persisted null values (bad state), reset to defaults immediately
// rather than deferring forever. This also syncs the reset back to the container.
if (!chartStore.symbol) chartStore.symbol = 'BTC/USDT.BINANCE'
if (!chartStore.period) chartStore.period = 900
chartInitialized = true
initChart()
}
@@ -73,7 +64,7 @@ function initChart() {
tvWidget = new window.TradingView.widget({
symbol: chartStore.symbol, // Use symbol from store
datafeed: datafeed,
interval: secondsToInterval(chartStore.period) as any,
interval: secondsToInterval(chartStore.period || 900) as any,
container: chartContainer.value!,
library_path: '/charting_library/',
locale: 'en',