mirror of
https://github.com/upstash/context7.git
synced 2026-01-06 04:01:30 +00:00
feat: add description field to SearchResult and update formatting to include description
This commit is contained in:
parent
eaa077c0a5
commit
f97c5a004b
@ -1,6 +1,7 @@
|
||||
export interface SearchResult {
|
||||
id: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
branch: string;
|
||||
lastUpdate: string;
|
||||
state: DocumentState;
|
||||
|
||||
@ -6,7 +6,7 @@ import { SearchResponse, SearchResult } from "./types.js";
|
||||
* @returns Formatted search result string
|
||||
*/
|
||||
export function formatSearchResult(result: SearchResult): string {
|
||||
return `Title: ${result.title}\n\nContext7-compatible library ID: ${result.id}`;
|
||||
return `Title: ${result.title}\n\nContext7-compatible library ID: ${result.id}\n\nDescription: ${result.description}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user