Skip to content

Commit

Permalink
feat: 🎨 update annotations link format and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Nov 22, 2024
1 parent c5e8d51 commit 11d06bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function convertAnnotationsToItems(text: string) {
t.replace(rx, (s, ...args) => {
const groups = args.at(-1)
const { file, line, severity, code, message } = groups
return `- ${SEV_EMOJI_MAP[severity?.toLowerCase()] ?? "info"} ${message} ([${host.path.basename(file)}#L${line}](${file}))`
return `- ${SEV_EMOJI_MAP[severity?.toLowerCase()] ?? "info"} ${message} (\`${host.path.basename(file)}#L${line}\`)`
}),
text
)
Expand Down
8 changes: 8 additions & 0 deletions packages/sample/genaisrc/lint.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ script({
title: "Universal Linter",
description: "Review files for correctness and style",
model: "large",
system: [
"system",
"system.assistant",
"system.annotations",
"system.safety_jailbreak",
"system.safety_harmful_content",
],
})

$`## Task
You are Linty, an linter for all known programming languages and natural languages.
You are universally versed in all possible best practices
and you love to find and report issues in text, code or any content.
Expand Down

0 comments on commit 11d06bb

Please sign in to comment.