client-py connected
This commit is contained in:
24
web/src/stores/channel.ts
Normal file
24
web/src/stores/channel.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export interface ChannelInfo {
|
||||
type: string
|
||||
connectedAt: number
|
||||
capabilities: {
|
||||
supportsSync: boolean
|
||||
supportsImages: boolean
|
||||
supportsMarkdown: boolean
|
||||
supportsStreaming: boolean
|
||||
supportsTradingViewEmbed: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export interface ChannelState {
|
||||
connected: Record<string, ChannelInfo>
|
||||
}
|
||||
|
||||
export const useChannelStore = defineStore('channelState', () => {
|
||||
const connected = ref<Record<string, ChannelInfo>>({})
|
||||
|
||||
return { connected }
|
||||
})
|
||||
@@ -5,18 +5,16 @@ export interface ChartState {
|
||||
symbol: string
|
||||
start_time: number | null
|
||||
end_time: number | null
|
||||
interval: string
|
||||
period: string
|
||||
selected_shapes: string[]
|
||||
}
|
||||
|
||||
export const useChartStore = defineStore('ChartStore', () => {
|
||||
const chart_state = ref<ChartState>({
|
||||
symbol: 'BINANCE:BTC/USDT',
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
interval: '15',
|
||||
selected_shapes: []
|
||||
})
|
||||
export const useChartStore = defineStore('chartState', () => {
|
||||
const symbol = ref<string>('BINANCE:BTC/USDT')
|
||||
const start_time = ref<number | null>(null)
|
||||
const end_time = ref<number | null>(null)
|
||||
const period = ref<string>('15')
|
||||
const selected_shapes = ref<string[]>([])
|
||||
|
||||
return { chart_state }
|
||||
return { symbol, start_time, end_time, period, selected_shapes }
|
||||
})
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface IndicatorInstance {
|
||||
original_id?: string
|
||||
}
|
||||
|
||||
export const useIndicatorStore = defineStore('IndicatorStore', () => {
|
||||
export const useIndicatorStore = defineStore('indicators', () => {
|
||||
const indicators = ref<Record<string, IndicatorInstance>>({})
|
||||
|
||||
// Helper methods
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface Shape {
|
||||
original_id?: string // Original ID from backend/agent before TradingView assigns its own ID
|
||||
}
|
||||
|
||||
export const useShapeStore = defineStore('ShapeStore', () => {
|
||||
export const useShapeStore = defineStore('shapes', () => {
|
||||
const shapes = ref<Record<string, Shape>>({})
|
||||
|
||||
// Helper methods
|
||||
|
||||
Reference in New Issue
Block a user