forked from sfreeman422/mocker
-
Notifications
You must be signed in to change notification settings - Fork 3
Add nightly Moonbeam argument leaderboard extraction, API, and muzzle.lol review UI #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
22
commits into
master
Choose a base branch
from
copilot/add-argument-leaderboard-table
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
fc70994
Initial plan
Copilot 34efe91
feat: add argument leaderboard page
Copilot a9a2285
refactor: move argument extraction to nightly job
Copilot 6d22437
fix: support multiple nightly argument extractions
Copilot 2ad28e5
fix: store argument participants as slack users
Copilot b11a8f2
fix: clean up argument participant persistence
Copilot 1f29b37
fix: tidy argument participant validation
Copilot f91b236
Add dashboard controller coverage
Copilot 23b96e4
Potential fix for pull request finding
sfreeman422 2833452
Potential fix for pull request finding
sfreeman422 0e1a81c
Potential fix for pull request finding
sfreeman422 0277d9e
Fix backend TypeORM test mock decorators
Copilot b404d5e
fix: replace 'return NONE' with '[]' in argument extraction prompt fo…
Copilot e45c7ae
refactor: centralize OpenAI response text extraction helper
Copilot 58cadab
fix: keep argument participant viewpoints in sync
Copilot 97b5a7b
Potential fix for pull request finding
sfreeman422 ce9c4b4
fix: skip argument extraction when bots leave fewer than two humans
Copilot 40a5c51
fix: exclude bot users from argument winners
Copilot cb3bc57
Potential fix for pull request finding
sfreeman422 17c7c52
test: cover bot exclusion in argument persistence specs
Copilot a04b28c
fix: cap argument history query
Copilot 646c676
Merge branch 'master' into copilot/add-argument-leaderboard-table
sfreeman422 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/backend/src/ai/helpers/extractOpenAiResponseText.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import type OpenAI from 'openai'; | ||
|
|
||
| export const extractOpenAiResponseText = (response: OpenAI.Responses.Response): string | undefined => { | ||
| const textBlock = response.output.find((item) => item.type === 'message'); | ||
| if (textBlock && 'content' in textBlock) { | ||
| const outputText = textBlock.content.find((item) => item.type === 'output_text'); | ||
| return outputText?.text.trim(); | ||
| } | ||
| return undefined; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest commit — both "return NONE" occurrences (the inline sentence and the
Return NONE for:section header) have been replaced with[]so the prompt consistently uses the JSON array contract throughout.