This commit is contained in:
team 1
2026-05-09 11:49:54 +02:00
parent bd62248c8d
commit 7f25335c44
5 changed files with 87 additions and 2 deletions

View File

@@ -386,6 +386,15 @@ final class AgentRunnerConfig
return $this->getRequiredString($legacyKey);
}
private function getChatOnlyRequiredString(string $chatKey): string
{
if ($this->chatMessages === null) {
throw new \InvalidArgumentException(sprintf('RetrieX chat messages config key "%s" is required.', $chatKey));
}
return $this->chatMessages->getString($chatKey);
}
private function getChatStringAllowEmpty(string $chatKey, string $legacyKey): string
{
if ($this->chatMessages !== null) {
@@ -1045,6 +1054,16 @@ final class AgentRunnerConfig
return $this->getChatRequiredString('agent.messages.debug_internal_error_prefix', 'messages.debug_internal_error_prefix');
}
public function getTechnicalErrorDetailTemplate(): string
{
return $this->getChatOnlyRequiredString('agent.messages.technical_error_detail_template');
}
public function getHistoryResponseSystemNoticeTemplate(): string
{
return $this->getChatOnlyRequiredString('agent.production_ui.templates.history_response_system_notice');
}
public function getExternalUrlSourceLabel(): string
{
return $this->getChatRequiredString('agent.source_labels.external_url', 'source_labels.external_url');