MCPcopy Create free account
hub / github.com/Noumena-Network/code / getDefaultAppState

Function getDefaultAppState

src/state/AppStateStore.ts:467–580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

465export type AppStateStore = Store<AppState>
466
467export function getDefaultAppState(): AppState {
468 // Determine initial permission mode for teammates spawned with plan_mode_required
469 // Use lazy require to avoid circular dependency with teammate.ts
470 /* eslint-disable @typescript-eslint/no-require-imports */
471 const teammateUtils =
472 require('../utils/teammate.js') as typeof import('../utils/teammate.js')
473 /* eslint-enable @typescript-eslint/no-require-imports */
474 const initialMode: PermissionMode =
475 teammateUtils.isTeammate() && teammateUtils.isPlanModeRequired()
476 ? 'plan'
477 : 'default'
478
479 return {
480 settings: getInitialSettings(),
481 tasks: {},
482 agentNameRegistry: new Map(),
483 verbose: false,
484 mainLoopModel: null, // alias, full name (as with --model or env var), or null (default)
485 mainLoopModelForSession: null,
486 statusLineText: undefined,
487 expandedView: 'none',
488 isBriefOnly: false,
489 showTeammateMessagePreview: false,
490 selectedIPAgentIndex: -1,
491 coordinatorTaskIndex: -1,
492 viewSelectionMode: 'none',
493 footerSelection: null,
494 kairosEnabled: false,
495 remoteSessionUrl: undefined,
496 remoteConnectionStatus: 'connecting',
497 remoteBackgroundTaskCount: 0,
498 replBridgeEnabled: false,
499 replBridgeExplicit: false,
500 replBridgeOutboundOnly: false,
501 replBridgeConnected: false,
502 replBridgeSessionActive: false,
503 replBridgeReconnecting: false,
504 replBridgeConnectUrl: undefined,
505 replBridgeSessionUrl: undefined,
506 replBridgeEnvironmentId: undefined,
507 replBridgeSessionId: undefined,
508 replBridgeError: undefined,
509 replBridgeInitialName: undefined,
510 showRemoteCallout: false,
511 toolPermissionContext: {
512 ...getEmptyToolPermissionContext(),
513 mode: initialMode,
514 },
515 agent: undefined,
516 agentDefinitions: { activeAgents: [], allAgents: [] },
517 fileHistory: {
518 snapshots: [],
519 trackedFiles: new Set(),
520 snapshotSequence: 0,
521 },
522 attribution: createEmptyAttributionState(),
523 mcp: {
524 clients: [],

Callers 15

runFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
SkillTool.test.tsFile · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85
createToolUseContextFunction · 0.85

Tested by 15

createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68
createToolUseContextFunction · 0.68