"use strict";(self.webpackChunksage_agent_internal=self.webpackChunksage_agent_internal||[]).push([[950],{8950:(e,n,t)=>{t.d(n,{PlanGenerationService:()=>i});var a=t(6209);class i{static async initialize(){try{this.planPrompt=t(9147),console.log("[PlanGenerationService] Initialized with prompt")}catch(e){throw console.error("[PlanGenerationService] Failed to initialize:",e),e}}static async generatePlan(e){try{const n=a.AppStateService.getChatService(),t=`## Notebook Summary\n${e.notebookSummary}\n\n## Current Plan\n${e.currentPlan||"No existing plan"}\n\n## Immediate Action\n${e.immediateAction}\n\nGenerate an updated plan based on this context.`,i=n.getModelName();return(await n.sendEphemeralMessage(t,this.planPrompt,i,void 0,{maxTokens:2048})).trim()}catch(e){throw console.error("[PlanGenerationService] Failed to generate plan:",e),e}}}i.planPrompt=""}}]);