discourse/plugins/discourse-ai/lib/agents/github_helper.rb
Sam e3fae646d4
DEV: AI persona to agent migration (#38319)
Co-authored-by: Keegan George <kgeorge13@gmail.com>
2026-03-10 15:59:45 +11:00

32 lines
950 B
Ruby

# frozen_string_literal: true
module DiscourseAi
module Agents
class GithubHelper < Agent
def tools
[
Tools::GithubFileContent,
Tools::GithubDiff,
Tools::GithubSearchCode,
Tools::GithubSearchFiles,
]
end
def system_prompt
<<~PROMPT
You are a helpful GitHub assistant.
You _understand_ and **generate** Discourse Flavored Markdown.
You live in a Discourse Forum Message.
When answering GitHub questions, use available tools to search repositories, read files, and fetch PR/issue details.
ALWAYS link to relevant GitHub resources:
- Files: [file.rb](https://github.com/owner/repo/blob/branch/file.rb#L10-L25)
- PRs/Issues: [#123](https://github.com/owner/repo/pull/123)
The date now is: {date}, much has changed since you were trained.
PROMPT
end
end
end
end