Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentCookbookCodeReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ git push`;

const part2Setup = `mkdir pr-reviewer && cd pr-reviewer
npm init -y
npm install @open-gitagent/opengap`;
npm install @open-gitagent/gitagent`;

const packageJson = `{
"type": "module",
"dependencies": {
"@open-gitagent/opengap": "^2.0.0"
"@open-gitagent/gitagent": "^2.0.0"
}
}`;

const envVars = `export ANTHROPIC_API_KEY=your_anthropic_key
export GITHUB_TOKEN=your_pat`;

const reviewTs = `import { query } from "@open-gitagent/opengap";
const reviewTs = `import { query } from "@open-gitagent/gitagent";
import { writeFileSync } from "fs";

const prUrl = process.argv[2];
Expand Down
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentCookbookCustomTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ git push`;

const part4Setup = `mkdir custom-tool-sdk && cd custom-tool-sdk
npm init -y
npm install @open-gitagent/opengap`;
npm install @open-gitagent/gitagent`;

const packageJson = `{
"type": "module",
"dependencies": {
"@open-gitagent/opengap": "^2.0.0"
"@open-gitagent/gitagent": "^2.0.0"
}
}`;

Expand All @@ -61,7 +61,7 @@ export GITHUB_TOKEN=your_pat
export GITHUB_REPO=your-username/test-issues
export DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/xxx/yyy`;

const indexTs = `import { query, tool } from "@open-gitagent/opengap";
const indexTs = `import { query, tool } from "@open-gitagent/gitagent";

const lookupGithubIssue = tool(
"lookup_github_issue",
Expand Down
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentCookbookMultiAgentHandoff.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@ const writerPush = `git add . && git commit -m "init writer agent" && git push`;

const part4Setup = `mkdir multi-agent-sdk && cd multi-agent-sdk
npm init -y
npm install @open-gitagent/opengap`;
npm install @open-gitagent/gitagent`;

const packageJson = `{
"type": "module",
"dependencies": {
"@open-gitagent/opengap": "^2.0.0"
"@open-gitagent/gitagent": "^2.0.0"
}
}`;

const envVars = `export ANTHROPIC_API_KEY=your_anthropic_key
export GITHUB_TOKEN=your_pat`;

const indexTs = `import { query } from "@open-gitagent/opengap";
const indexTs = `import { query } from "@open-gitagent/gitagent";

async function main() {
console.log("Agent 1 — Scanning codebase for issues...\\n");
Expand Down
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentCookbookRefactorRepo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ git push`;

const part2Setup = `mkdir refactor-sdk && cd refactor-sdk
npm init -y
npm install @open-gitagent/opengap`;
npm install @open-gitagent/gitagent`;

const packageJson = `{
"type": "module",
"dependencies": {
"@open-gitagent/opengap": "^2.0.0"
"@open-gitagent/gitagent": "^2.0.0"
}
}`;

const indexTs = `import { query } from "@open-gitagent/opengap";
const indexTs = `import { query } from "@open-gitagent/gitagent";

async function main() {
const result = query({
Expand Down
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentCookbookScheduledCron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ const part2Push = `git add . && git commit -m "init standup agent" && git push`;

const part4Setup = `mkdir standup-sdk && cd standup-sdk
npm init -y
npm install @open-gitagent/opengap node-cron
npm install @open-gitagent/gitagent node-cron
npm install -D tsx`;

const packageJson = `{
"type": "module",
"dependencies": {
"@open-gitagent/opengap": "^2.0.0",
"@open-gitagent/gitagent": "^2.0.0",
"node-cron": "^4.2.1"
}
}`;
Expand All @@ -78,7 +78,7 @@ const envVars = `export ANTHROPIC_API_KEY=your_anthropic_key
export GITHUB_TOKEN=your_pat
export DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...`;

const indexTs = `import { query } from "@open-gitagent/opengap";
const indexTs = `import { query } from "@open-gitagent/gitagent";
import cron from "node-cron";

async function runStandup() {
Expand Down
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentCookbookSummarizeEmails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ const runGetToken = `node get-token.mjs`;

const part3Setup = `mkdir email-summarizer && cd email-summarizer
npm init -y
npm install @open-gitagent/opengap googleapis`;
npm install @open-gitagent/gitagent googleapis`;

const packageJson = `{
"type": "module",
"dependencies": {
"@open-gitagent/opengap": "^2.0.0",
"@open-gitagent/gitagent": "^2.0.0",
"googleapis": "latest"
}
}`;
Expand All @@ -88,7 +88,7 @@ export GMAIL_CLIENT_ID=your_client_id
export GMAIL_CLIENT_SECRET=your_client_secret
export GMAIL_REFRESH_TOKEN=your_refresh_token`;

const indexTs = `import { query, tool } from "@open-gitagent/opengap";
const indexTs = `import { query, tool } from "@open-gitagent/gitagent";
import { google } from "googleapis";

const auth = new google.auth.OAuth2(
Expand Down
2 changes: 1 addition & 1 deletion src/components/gitAgent/GitAgentHeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { motion } from "framer-motion";
import { Copy, Check, BookOpen, Github, ArrowRight, Folder, FileText, Brain, Settings, Zap, Wrench, Database, GitFork, ShieldCheck } from "lucide-react";
import { track } from "@/lib/analytics";

const INSTALL_CMD = `npm install -g @open-gitagent/opengap`;
const INSTALL_CMD = `npm install -g @open-gitagent/gitagent`;

type TreeItem = { name: string; indent: number; icon: React.ReactNode; tag?: string };

Expand Down
2 changes: 1 addition & 1 deletion src/components/gitAgent/GitAgentInterfaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { motion } from "framer-motion";
import { Terminal, Globe, MessageSquare, Code2 } from "lucide-react";
import { CodeBlock } from "@/components/gitAgent/CodeBlock";

const sdkCode = `import { query } from "@open-gitagent/opengap";\n\nfor await (const msg of query({\n prompt: "Summarise yesterday's tasks",\n dir: "./my-agent",\n})) {\n if (msg.type === "assistant") console.log(msg.content);\n}`;
const sdkCode = `import { query } from "@open-gitagent/gitagent";\n\nfor await (const msg of query({\n prompt: "Summarise yesterday's tasks",\n dir: "./my-agent",\n})) {\n if (msg.type === "assistant") console.log(msg.content);\n}`;

const paItems = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/gitAgent/GitAgentModels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const compatibleEndpoints = [
{ name: "Any OpenAI-compatible proxy", port: "" },
];

const lyzrSdkCode = `import { query } from "@open-gitagent/opengap";
const lyzrSdkCode = `import { query } from "@open-gitagent/gitagent";

const result = query({
prompt: "Hello! What can you help me with?",
Expand Down
2 changes: 1 addition & 1 deletion src/components/gitAgent/GitAgentPlugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const agentYamlConfig = `plugins:
api_key: "your-api-key"
timeout: 30`;

const sdkCode = `import type { GitagentPluginApi } from "@open-gitagent/opengap";
const sdkCode = `import type { GitagentPluginApi } from "@open-gitagent/gitagent";

export function register(api: GitagentPluginApi) {
api.registerTool(myTool);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const installMethods = [
},
{
title: "Manual install",
code: `npm install -g @open-gitagent/opengap
code: `npm install -g @open-gitagent/gitagent
mkdir ~/assistant && cd ~/assistant && git init
gitagent --voice --dir .`,
desc: "",
Expand Down
6 changes: 3 additions & 3 deletions src/components/gitAgent/GitAgentQuickStartSDK.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { motion } from "framer-motion";
import { CodeBlock } from "@/components/gitAgent/CodeBlock";

const installCode = `npm install @open-gitagent/opengap`;
const installCode = `npm install @open-gitagent/gitagent`;

const pathWithRepo = `import { query } from "@open-gitagent/opengap";
const pathWithRepo = `import { query } from "@open-gitagent/gitagent";

for await (const msg of query({
prompt: "Summarise the open pull requests",
Expand All @@ -12,7 +12,7 @@ for await (const msg of query({
if (msg.type === "assistant") console.log(msg.content);
}`;

const pathWithoutRepo = `import { query } from "@open-gitagent/opengap";
const pathWithoutRepo = `import { query } from "@open-gitagent/gitagent";

for await (const msg of query({
prompt: "Refactor the auth module in src/auth.ts",
Expand Down
10 changes: 5 additions & 5 deletions src/components/gitAgent/GitAgentSDK.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const tabs = ["query()", "tool()", "buildTool()", "hooks"] as const;
type Tab = (typeof tabs)[number];

const codeMap: Record<Tab, string> = {
"query()": `import { query } from "@open-gitagent/opengap";
"query()": `import { query } from "@open-gitagent/gitagent";

for await (const msg of query({
prompt: "Refactor the auth module",
Expand All @@ -28,7 +28,7 @@ for await (const msg of query({
console.log(\`[\${msg.subtype}] \${msg.content}\`); break;
}
}`,
"tool()": `import { query, tool } from "@open-gitagent/opengap";
"tool()": `import { query, tool } from "@open-gitagent/gitagent";

const search = tool(
"search_docs",
Expand All @@ -49,7 +49,7 @@ const search = tool(
for await (const msg of query({ prompt: "Find auth docs", tools: [search] })) {
// agent can now call search_docs
}`,
"buildTool()": `import { buildTool } from "@open-gitagent/opengap";
"buildTool()": `import { buildTool } from "@open-gitagent/gitagent";

const myTool = buildTool({
name: "search_docs",
Expand Down Expand Up @@ -98,7 +98,7 @@ const myTool = buildTool({
});`,
};

const pathWithRepo = `import { query } from "@open-gitagent/opengap";
const pathWithRepo = `import { query } from "@open-gitagent/gitagent";

for await (const msg of query({
repo: "https://github.com/open-gitagent/opengap",
Expand All @@ -107,7 +107,7 @@ for await (const msg of query({
if (msg.type === "assistant") console.log(msg.content);
}`;

const pathWithoutRepo = `import { query } from "@open-gitagent/opengap";
const pathWithoutRepo = `import { query } from "@open-gitagent/gitagent";

for await (const msg of query({
prompt: "Refactor the auth module in src/auth.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/components/gitAgent/GitAgentUtilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const compactionCode = `import {
needsCompaction,
truncateToolResults,
buildCompactPrompt
} from "@open-gitagent/opengap";
} from "@open-gitagent/gitagent";

// Estimate tokens in a string
const tokens = estimateTokens("Hello world"); // ~3
Expand All @@ -24,7 +24,7 @@ const trimmed = truncateToolResults(messages, 10000);
// Build a summarization prompt for the LLM
const prompt = buildCompactPrompt(messages);`;

const costTrackingCode = `import { query } from "@open-gitagent/opengap";
const costTrackingCode = `import { query } from "@open-gitagent/gitagent";

const result = query({ prompt: "...", dir: "..." });

Expand Down