MCPcopy Create free account
hub / github.com/pingdotgg/t3code / openCodeQuestionId

Function openCodeQuestionId

apps/server/src/provider/opencodeRuntime.ts:182–191  ·  view source on GitHub ↗
(
  index: number,
  question: QuestionRequest["questions"][number],
)

Source from the content-addressed store, hash-verified

180}
181
182export function openCodeQuestionId(
183 index: number,
184 question: QuestionRequest["questions"][number],
185): string {
186 const header = question.header
187 .trim()
188 .toLowerCase()
189 .replace(/[^a-z0-9_-]+/g, "-");
190 return header.length > 0 ? `question-${index}-${header}` : `question-${index}`;
191}
192
193export function toOpenCodeFileParts(input: {
194 readonly attachments: ReadonlyArray<ChatAttachment> | undefined;

Callers 3

normalizeQuestionRequestFunction · 0.90
makeOpenCodeAdapterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected