护栏与审查
用简单英文编写的Lint规则,Oxlint定位代码,TypeSafe Jev回答相关问题。
Lint rules written in plain English. Oxlint finds the code, TypeSafe Jev answers the question.
const DEFAULT_BASE_URL = 'https://api.typesafe.ai';链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
s0是/否Consider only snippet "s0" in state.snippets. Does this call print, log, or send a password, token, secret, or API key?
s1是/否Consider only snippet "s1" in state.snippets. Does this function swallow an error silently?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
s0: { type: 'boolean', instructions: 'Consider only snippet "s0" in state.snippets. Does this call print, log, or send a password, token, secret, or API key?' },
s1: { type: 'boolean', instructions: 'Consider only snippet "s1" in state.snippets. Does this function swallow an error silently?' },
},
});