Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit b434071

Browse files
committed
DEV: Fix linting errors
1 parent d322287 commit b434071

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

app/controllers/discourse_ai/admin/ai_personas_controller.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ def index
2323
.each do |tool|
2424
tools << {
2525
id: "custom-#{tool.id}",
26-
name: I18n.t("discourse_ai.tools.custom_name", name: tool.name.capitalize, tool_name: tool.tool_name),
26+
name:
27+
I18n.t(
28+
"discourse_ai.tools.custom_name",
29+
name: tool.name.capitalize,
30+
tool_name: tool.tool_name,
31+
),
2732
}
2833
end
2934
llms =

app/models/ai_tool.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ class AiTool < ActiveRecord::Base
2222
}
2323

2424
def signature
25-
{ name: function_call_name, description: description, parameters: parameters.map(&:symbolize_keys) }
25+
{
26+
name: function_call_name,
27+
description: description,
28+
parameters: parameters.map(&:symbolize_keys),
29+
}
2630
end
2731

2832
# Backwards compatibility: if tool_name is not set (existing custom tools), use name

db/migrate/20241020010245_add_tool_name_to_ai_tools.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class AddToolNameToAiTools < ActiveRecord::Migration[7.1]
44
def change
5-
add_column :ai_tools, :tool_name, :string, null: false, default: '', if_not_exists: true
5+
add_column :ai_tools, :tool_name, :string, null: false, default: "", if_not_exists: true
66
add_index :ai_tools, :tool_name, unique: true, if_not_exists: true
77
end
88
end

0 commit comments

Comments
 (0)