搜索与检索

jgrep

@kyu12046TypeScriptMIT更新于 2026-09-19可当场跑

基于 TypeSafe Jev 的语义代码搜索工具,按代码功能而非名称进行查找。

英文原文

grep for what code does, not what it's called. Semantic code search powered by TypeSafe Jev.

kyu1204/jgrep

它在哪儿调用了 Jev

s.start("Checking the key against api.typesafe.ai");

src/init.ts:49

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 src/jgrep.test.ts:113

  1. beauty是/否

    beauty content?

  2. cat选项

    category?

    • skincareskin
    • otherelse

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    beauty: { type: 'boolean', instructions: 'beauty content?' },
    cat: { type: 'choice', instructions: 'category?',
      criteria: { skincare: 'skin', other: 'else' } },
  },
});

取自 src/jgrep.ts:224

  1. ok是/否

    Is the state the word ping?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    ok: { type: 'boolean', instructions: 'Is the state the word ping?' },
  },
});

同类的其他项目