MCPcopy Create free account
hub / github.com/continuedev/continue / shouldQueueInitialPrompt

Function shouldQueueInitialPrompt

extensions/cli/src/commands/serve.ts:58–71  ·  view source on GitHub ↗
(
  history: ChatHistoryItem[],
  prompt?: string | null,
)

Source from the content-addressed store, hash-verified

56 * messages already exist (e.g., after resume), skip to avoid replaying.
57 */
58export function shouldQueueInitialPrompt(
59 history: ChatHistoryItem[],
60 prompt?: string | null,
61): boolean {
62 if (!prompt) {
63 return false;
64 }
65
66 // If there are any non-system messages, we already have conversation context
67 const hasConversation = history.some(
68 (item) => item.message.role !== "system",
69 );
70 return !hasConversation;
71}
72
73// eslint-disable-next-line max-statements
74export async function serve(prompt?: string, options: ServeOptions = {}) {

Callers 2

serveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected