You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=api&page=8&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 19668 results for "api"(2228ms)
49}
5051// Check if user is authenticated (for API endpoints)
52function isAuthenticated(c: any): boolean {
53const sessionToken = getSignedCookie(c, SESSION_SECRET, "admin_session");
115});
116117// API info endpoint moved to /api
118app.get("/api", async (c) => {
119// Only show cache stats if authenticated
120let cacheInfo = {};
133134return c.json({
135message: "Plant Information API",
136usage: "GET /plant/:name - Get information about a specific plant",
137example: "/plant/rose",
177/** Retry a user message */
178const retryMessage = async (messageId: string) => {
179if (status !== "idle" || !config.anthropicApiKey) return;
180181const userText = onRetryFromMessage(messageId);
203console.log("[Chat] fire send", { userText, input });
204const messageText = userText || input.trim();
205if (!messageText || status !== "idle" || !config.anthropicApiKey) return;
206207// Only clear input if we're using the current input (not NextSteps execution)
262};
263264const canSend = input?.trim() && status === "idle" && config.anthropicApiKey;
265266/* ββ UI βββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
268<>
269<div className="chat-messages">
270{!config.anthropicApiKey && (
271<div className="message system">
272Please configure your Anthropic API key in settings to start chatting
273</div>
274)}
379}}
380onKeyDown={handleKeyDown}
381placeholder={config.anthropicApiKey
382? streaming
383? "Streamingβ¦"
385? "Waiting for your input aboveβ¦"
386: "Type your message or / for commandsβ¦"
387: "Configure API key in settings first"}
388className="chat-input"
389disabled={!config.anthropicApiKey || thinking || waitingForUser}
390rows={1}
391/>