{
"event": "PreToolUse",
"tool_name": "Grep",
"tool_input": {
"pattern": "ALLOWED_MODELS|getAvailableCollections",
"path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ChatController.php",
"output_mode": "content",
"-A": 10,
"-n": true
}
}
{
"tool_response": {
"mode": "content",
"numFiles": 0,
"filenames": [],
"content": "58: $collections = $this->getAvailableCollections();\n59-\n60- $this->view('chat.index', [\n61- 'title' => $session['title'] ?? 'KI-Chat',\n62- 'session' => $session,\n63- 'messages' => $messages,\n64- 'sessions' => $sessions,\n65- 'authorProfiles' => $authorProfiles,\n66- 'systemPrompts' => $systemPrompts,\n67- 'collections' => $collections,\n68- ]);\n--\n526: private function getAvailableCollections(): array\n527- {\n528- if ($this->collectionsCache === null) {\n529- $this->collectionsCache = $this->qdrantService->listCollections();\n530-\n531- \/\/ Fallback if Qdrant is unavailable\n532- if ($this->collectionsCache === []) {\n533- $this->collectionsCache = ['documents'];\n534- }\n535- }\n536-\n--\n548: $availableCollections = $this->getAvailableCollections();\n549-\n550- \/\/ Handle string input (backwards compatibility)\n551- if (is_string($collections)) {\n552- $collections = [$collections];\n553- }\n554-\n555- \/\/ Filter to only valid collections\n556- $valid = array_filter($collections, fn($c) => in_array($c, $availableCollections, true));\n557-\n558- return array_values($valid);",
"numLines": 35
}
}