You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bart_info.art.src%7D?q=api&page=68&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 15267 results for "api"(1415ms)
1112try {
13// Test creating a thread with v2 API
14const response = await fetch("https://api.openai.com/v1/threads", {
15method: "POST",
16headers: {
17"Authorization": `Bearer ${Deno.env.get("OPENAI_API_KEY")}`,
18"Content-Type": "application/json",
19"OpenAI-Beta": "assistants=v2",
35JSON.stringify(
36{
37test: "v2 API Test",
38status: response.status,
39headers_sent: {
1920export interface AppConfig {
21anthropicApiKey: string;
22mcpServers: MCPServer[];
23selectedModel: string;
36export default function App() {
37const [config, setConfig] = useState<AppConfig>({
38anthropicApiKey: "",
39mcpServers: DEFAULT_MCP_SERVERS,
40selectedModel: "claude-3-5-sonnet-20241022",
45// Load config from localStorage on mount
46useEffect(() => {
47const savedApiKey = localStorage.getItem("anthropic_api_key");
48const savedMcpServers = localStorage.getItem("mcp_servers");
49const savedMessages = localStorage.getItem("chat_messages");
5152setConfig({
53anthropicApiKey: savedApiKey || "",
54mcpServers: savedMcpServers ? JSON.parse(savedMcpServers) : DEFAULT_MCP_SERVERS,
55selectedModel: savedModel || "claude-3-5-sonnet-20241022",
66}
6768// Show settings if no API key is configured
69if (!savedApiKey) {
70setShowSettings(true);
71}
74// Save config to localStorage when it changes
75useEffect(() => {
76if (config.anthropicApiKey) {
77localStorage.setItem("anthropic_api_key", config.anthropicApiKey);
78}
79localStorage.setItem("mcp_servers", JSON.stringify(config.mcpServers));