harden runner fullcontext
This commit is contained in:
@@ -30,7 +30,7 @@ final readonly class AgentRunner
|
||||
{
|
||||
}
|
||||
|
||||
public function run(string $prompt, string $userId): Generator
|
||||
public function run(string $prompt, string $userId, ?bool $includeFullContext = false): Generator
|
||||
{
|
||||
$prompt = trim($prompt);
|
||||
|
||||
@@ -47,7 +47,7 @@ final readonly class AgentRunner
|
||||
// ---------------------------------------------------------
|
||||
// 1) Context strategy
|
||||
// ---------------------------------------------------------
|
||||
$includeFullContext = false;
|
||||
//$includeFullContext = false;
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// 2) Extract URL content (if present)
|
||||
|
||||
@@ -32,7 +32,7 @@ final readonly class PromptBuilder
|
||||
string $userId,
|
||||
string $urlContent,
|
||||
array $knowledgeChunks,
|
||||
bool $fullContext = false,
|
||||
?bool $fullContext = false,
|
||||
): string
|
||||
{
|
||||
$now = (new DateTimeImmutable())->format('Y-m-d H:i:s');
|
||||
@@ -47,7 +47,8 @@ final readonly class PromptBuilder
|
||||
throw new \RuntimeException('No active system prompt configured.');
|
||||
}
|
||||
|
||||
$systemBlock = "SYSTEM:\n" . $activePrompt->getContent();
|
||||
$activeSystemPrompt = str_replace('{%now%}', $now, $activePrompt->getContent());
|
||||
$systemBlock = "SYSTEM:\n" . $activeSystemPrompt;
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// 2) CONVERSATION CONTEXT (AUTHORITATIVE)
|
||||
|
||||
Reference in New Issue
Block a user