Skip to content

Instantly share code, notes, and snippets.

View jlia0's full-sized avatar
🎯
Focusing

Jian Liao jlia0

🎯
Focusing
View GitHub Profile
@jlia0
jlia0 / response-to-chat-stream-converter.ts
Last active September 17, 2025 21:53
OpenAI Response API to Chat Completion API Stream Converter
import { EventEmitter } from "events";
import { nanoid } from "nanoid";
interface ChatCompletionChunk {
id: string;
object: "chat.completion.chunk";
created: number;
model: string;
choices: Array<{
index: number;
@jlia0
jlia0 / AgentActionMap.tsx
Created May 27, 2025 19:24
AgentActionMap
import React, { useEffect, useRef, type ReactNode } from "react";
interface AgentActionMapProps {
children: ReactNode;
componentName?: string;
description?: string;
generateLocators?: boolean;
customAttributes?: Record<string, string>;
}
@jlia0
jlia0 / agent loop
Last active October 26, 2025 04:25
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet