上下文工程

opencode-jev-compactor

@christian-taillon2TypeScriptMIT更新于 2026-09-18可当场跑

基于Jev的OpenCode代码压缩工具

英文原文

Jev powered OpenCode compaction

christian-taillon/opencode-jev-compactor

它在哪儿调用了 Jev

baseUrl: "https://api.typesafe.ai/v1/systemone",

src/plugin/options.ts:44

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

它问 Jev 的问题

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

取自 src/jev/compare.ts:43

  1. comparison选项

    Which of `left` or `right` better satisfies `criterion` in `context`? Choose tie when neither has a material advantage.

    • left`left` better satisfies the criterion.
    • right`right` better satisfies the criterion.
    • tieThey satisfy the criterion about equally, or state is insufficient to distinguish them.

用你自己的内容跑一遍

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

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    comparison: { type: 'choice', instructions: 'Which of `left` or `right` better satisfies `criterion` in `context`? Choose tie when neither has a material advantage.',
      criteria: { left: '`left` better satisfies the criterion.', right: '`right` better satisfies the criterion.', tie: 'They satisfy the criterion about equally, or state is insufficient to distinguish them.' } },
  },
});

同类的其他项目