8 * Generates user-facing release notes from commit and PR data
9 */
10export async function generateReleaseNotes(commits: CommitWithPR[]): Promise<{
11 notes: ReleaseNote[];
12 markdown: string;
113 * Process a chunk of commits to generate release notes
114 */
115async function processCommitChunk(
116 commitChunk: any[],
117 chunkIndex: number,
142For impact assessment, use these specific criteria:
143- "high" impact: Major new features that users will love and significantly improve their experience
144- "medium" impact: Nice-to-have new features and substantial improvements to existing functionality
145- "low" impact: Minor improvements and bug fixes that users will notice
146- DO NOT include changes that aren't user-facing, heavy backend changes, or very small fixes
236 * Generate markdown from release notes
237 */
238function generateMarkdownFromNotes(notes: ReleaseNote[]): string {
239 // Group notes by type
240 const groupedNotes: Record<string, ReleaseNote[]> = {
1import { useEffect } from "https://esm.sh/react@18.2.0?dev";
2
3export function useUsageStats (messages: any[], usages: any[]) {
4 useEffect(() => {
5 if (!messages?.length) return;
7 *
8 * @param {Array} dependencies - Array of dependencies that trigger scrolling when changed
9 * @returns {Object} An object containing containerRef and scrollToBottom function
10 */
11export function useScrollToBottomContainer(dependencies = []) {
12 const containerRef = useRef(null);
13
28
29// body scroll version
30export function useScrollToBottom(dependencies = []) {
31 const bottomRef = useRef(null);
32
6 * This includes a fallback to inference calls data when usage data is missing
7 */
8export async function getUserSummary() {
9 // First, get the standard grouped data from the usage table
10 const groupedUsageData = await sqlite.execute(`
5const FILES_ENDPOINT = "/api/project-files";
6
7export function useProject (projectId: string, branchId?: string) {
8 const { token } = useAuth();
9 const [data, setData] = useState<any>(null);
4const ENDPOINT = "/api/projects-loader";
5
6export function useProjects () {
7 const { token } = useAuth();
8 const [data, setData] = useState<any>(null);
1import { useEffect } from "https://esm.sh/react@18.2.0?dev";
2
3function setLoadingFavicon() {
4 document.querySelector('link[rel="icon"]').href = "/favicon-loading.svg";
5}
6function resetFavicon () {
7 document.querySelector('link[rel="icon"]').href = "/favicon.svg";
8}
9
10export function useLoadingFavicon (loading: boolean) {
11 useEffect(() => {
12 if (loading) setLoadingFavicon();
5const ENDPOINT = "/api/create-project";
6
7export function useCreateProject () {
8 const { token } = useAuth();
9 const [data, setData] = useState<any>(null);
4const ENDPOINT = "/api/create-branch";
5
6export function useCreateBranch (projectId: string) {
7 const { token } = useAuth();
8 const [data, setData] = useState<any>(null);
13}
14
15export function useChatLogic({
16 project,
17 branchId,
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",