You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$1?q=api&page=59&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 18781 results for "api"(1267ms)
1516export interface AppConfig {
17anthropicApiKey: string;
18mcpServers: MCPServerConfig[];
19selectedModel: string;
39export default function App() {
40const [config, setConfig] = useState<AppConfig>({
41anthropicApiKey: "",
42mcpServers: [],
43selectedModel: "claude-3-5-sonnet-20241022",
53// Load config from localStorage on mount
54useEffect(() => {
55const savedApiKey = localStorage.getItem("anthropic_api_key");
56const savedMcpServers = localStorage.getItem("mcp_servers");
57const savedMessages = localStorage.getItem("chat_messages");
6061setConfig({
62anthropicApiKey: savedApiKey || "",
63mcpServers: savedMcpServers ? JSON.parse(savedMcpServers) : DEFAULT_MCP_SERVERS,
64selectedModel: savedModel || "claude-3-5-sonnet-20241022",
76}
7778// Show settings if no API key is configured
79if (!savedApiKey) {
80setShowSettings(true);
81}
84// Save config to localStorage when it changes
85useEffect(() => {
86if (config.anthropicApiKey) {
87localStorage.setItem("anthropic_api_key", config.anthropicApiKey);
88}
89localStorage.setItem("mcp_servers", JSON.stringify(config.mcpServers));
139140const queryFn = () =>
141fetch(`/api/channels`)
142.then((r) => r.json())
143.then((r) => r?.data?.channels?.find((c) => c.channel_name == channel))
146147const join = async () => {
148const response = await fetch(`/api/token?channel=${channel}&uid=${uid}`).then((r) => r.json())
149console.log('response', response)
150setToken(response.token)