MCPcopy
hub / github.com/ValueCell-ai/ClawX / splitChannelId

Function splitChannelId

src/stores/channels.ts:44–53  ·  view source on GitHub ↗
(channelId: string)

Source from the content-addressed store, hash-verified

42const reconnectAttempts = new Map<string, number>();
43
44function splitChannelId(channelId: string): { channelType: string; accountId?: string } {
45 const separatorIndex = channelId.indexOf('-');
46 if (separatorIndex === -1) {
47 return { channelType: channelId };
48 }
49 return {
50 channelType: channelId.slice(0, separatorIndex),
51 accountId: channelId.slice(separatorIndex + 1),
52 };
53}
54
55export const useChannelsStore = create<ChannelsState>((set, get) => ({
56 channels: [],

Callers 1

channels.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected