MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / startThread

Method startThread

src/providers/codex/plugin.ts:123–151  ·  view source on GitHub ↗
({
    providerProfile,
    cwd = null,
    title = null,
    ephemeral = null,
    metadata = {},
  }: {
    providerProfile: ProviderProfile;
    cwd?: string | null;
    title?: string | null;
    ephemeral?: boolean | null;
    metadata?: Record<string, unknown>;
  })

Source from the content-addressed store, hash-verified

121 }
122
123 async startThread({
124 providerProfile,
125 cwd = null,
126 title = null,
127 ephemeral = null,
128 metadata = {},
129 }: {
130 providerProfile: ProviderProfile;
131 cwd?: string | null;
132 title?: string | null;
133 ephemeral?: boolean | null;
134 metadata?: Record<string, unknown>;
135 }): Promise<ProviderThreadStartResult> {
136 const client = await this.ensureClient(providerProfile);
137 const modelInfo = await this.resolveModelInfo(providerProfile, client, null);
138 const sessionSettings = isSessionSettingsLike(metadata?.sessionSettings)
139 ? metadata.sessionSettings
140 : null;
141 const permissionOverrides = buildCodexPermissionRuntimeOverrides(sessionSettings);
142 return client.startThread({
143 cwd,
144 title,
145 model: modelInfo?.model ?? null,
146 approvalPolicy: permissionOverrides.approvalPolicy,
147 sandboxMode: permissionOverrides.sandboxMode,
148 configOverrides: permissionOverrides.configOverrides,
149 ephemeral,
150 });
151 }
152
153 async readThread({
154 providerProfile,

Callers

nothing calls this directly

Calls 5

ensureClientMethod · 0.95
resolveModelInfoMethod · 0.95
isSessionSettingsLikeFunction · 0.85
startThreadMethod · 0.65

Tested by

no test coverage detected