brainiac-github 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/brainiac/plugins/github/handler.rb +9 -1
- data/lib/brainiac/plugins/github/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 708e7c1fc05829642c2f04b08c5d12eb3350bcf40f6cfbd7b923e94252718d33
|
|
4
|
+
data.tar.gz: de33a6acca8074115ea7c8102828acc830eb2f43e453407273156acb6bc6e274
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 707cec265ade4657632ce8ac14a17c30e6658b8fdf61e403b0375d9979d3aae2db05f6c16c0c830dadc257a66839de4f435f70de185ac2446cd3d3ccab331286
|
|
7
|
+
data.tar.gz: f645bfe2c9d66169a1a0293920919f7783776a784363c9892264419b87ee88b81ba8243828d256f54bf44e6b9637a51c787496f2eacb217c3fc42558dab34ca3
|
|
@@ -742,15 +742,23 @@ module Brainiac
|
|
|
742
742
|
|
|
743
743
|
intent_ctx = fetch_pr_intent_context(pr_number, repo_name, agent_name)
|
|
744
744
|
agent_env = github_agent_env(agent_name, repo_name)
|
|
745
|
+
# detect_model_explicit is newer core; fall back to detect_model on older builds.
|
|
746
|
+
if respond_to?(:detect_model_explicit)
|
|
747
|
+
comment_model, comment_model_explicit = detect_model_explicit(project_config, text: comment_body)
|
|
748
|
+
else
|
|
749
|
+
comment_model = detect_model(project_config, text: comment_body)
|
|
750
|
+
comment_model_explicit = nil
|
|
751
|
+
end
|
|
745
752
|
run_agent_opts = { project_config: project_config, chdir: worktree,
|
|
746
753
|
log_name: "pr-comment-#{pr_number}",
|
|
747
|
-
model:
|
|
754
|
+
model: comment_model,
|
|
748
755
|
effort: detect_effort(project_config, text: comment_body),
|
|
749
756
|
agent_name: agent_name, source: :github,
|
|
750
757
|
source_context: { pr_number: pr_number, repo_name: repo_name, work_dir: worktree },
|
|
751
758
|
message: comment_body, channel: "GitHub PR comment",
|
|
752
759
|
context: intent_ctx }
|
|
753
760
|
run_agent_opts[:env] = agent_env if method(:run_agent).parameters.flatten.include?(:env)
|
|
761
|
+
run_agent_opts[:explicit_model] = comment_model_explicit if method(:run_agent).parameters.flatten.include?(:explicit_model)
|
|
754
762
|
pid, log_file = run_agent(prompt, **run_agent_opts)
|
|
755
763
|
return unless pid
|
|
756
764
|
|