mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-04-06 04:42:44 -04:00
refactor: Add external LLMCore lib (#334)
* feat: Add LLMCore submodule
This commit is contained in:
@ -43,12 +43,12 @@ ProjectSearchTool::ProjectSearchTool(QObject *parent)
|
||||
, m_ignoreManager(new Context::IgnoreManager(this))
|
||||
{}
|
||||
|
||||
QString ProjectSearchTool::name() const
|
||||
QString ProjectSearchTool::id() const
|
||||
{
|
||||
return "search_project";
|
||||
}
|
||||
|
||||
QString ProjectSearchTool::stringName() const
|
||||
QString ProjectSearchTool::displayName() const
|
||||
{
|
||||
return "Searching in project";
|
||||
}
|
||||
@ -60,7 +60,7 @@ QString ProjectSearchTool::description() const
|
||||
"Symbol mode: finds C++ definitions (classes, functions, etc).";
|
||||
}
|
||||
|
||||
QJsonObject ProjectSearchTool::getDefinition(LLMCore::ToolSchemaFormat format) const
|
||||
QJsonObject ProjectSearchTool::parametersSchema() const
|
||||
{
|
||||
QJsonObject properties;
|
||||
|
||||
@ -94,24 +94,9 @@ QJsonObject ProjectSearchTool::getDefinition(LLMCore::ToolSchemaFormat format) c
|
||||
definition["properties"] = properties;
|
||||
definition["required"] = QJsonArray{"query", "search_type"};
|
||||
|
||||
switch (format) {
|
||||
case LLMCore::ToolSchemaFormat::OpenAI:
|
||||
return customizeForOpenAI(definition);
|
||||
case LLMCore::ToolSchemaFormat::Claude:
|
||||
return customizeForClaude(definition);
|
||||
case LLMCore::ToolSchemaFormat::Ollama:
|
||||
return customizeForOllama(definition);
|
||||
case LLMCore::ToolSchemaFormat::Google:
|
||||
return customizeForGoogle(definition);
|
||||
}
|
||||
return definition;
|
||||
}
|
||||
|
||||
LLMCore::ToolPermissions ProjectSearchTool::requiredPermissions() const
|
||||
{
|
||||
return LLMCore::ToolPermission::FileSystemRead;
|
||||
}
|
||||
|
||||
QFuture<QString> ProjectSearchTool::executeAsync(const QJsonObject &input)
|
||||
{
|
||||
return QtConcurrent::run([this, input]() -> QString {
|
||||
|
||||
Reference in New Issue
Block a user