Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions Server/app/worker-service/Examples-1/chunks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[
{
"id": "",
"content": "import axios from \"axios\";",
"filePath": "app/worker-service/services/gif.service.ts",
"chunkIndex": 0,
"nodeType": "import",
"symbolName": "axios",
"startLine": 1,
"endLine": 1,
"imports": [
"import axios from \"axios\";"
]
},
{
"id": "",
"content": "type GiphyResponse = {\n data: Array<{ images: { fixed_height: { url: string } } }>;\n};",
"filePath": "app/worker-service/services/gif.service.ts",
"chunkIndex": 1,
"nodeType": "type",
"symbolName": "GiphyResponse",
"startLine": 3,
"endLine": 5,
"imports": [
"import axios from \"axios\";"
]
},
{
"id": "",
"content": "export async function findGIF(query: string): Promise<string | null> {\n const giphyApiKey = process.env.GIPHY_API_KEY;\n if (!giphyApiKey || !query.trim()) return null;\n\n try {\n const response = await axios.get<GiphyResponse>(\n \"https://api.giphy.com/v1/gifs/search\",\n {\n params: {\n api_key: giphyApiKey,\n q: query,\n limit: 1,\n },\n },\n );\n\n return response.data.data[0]?.images.fixed_height.url ?? null;\n } catch (error) {\n console.error(\"Failed to find GIF for review comment\", error);\n return null;\n }\n}",
"filePath": "app/worker-service/services/gif.service.ts",
"chunkIndex": 2,
"nodeType": "export",
"symbolName": "export_statement",
"startLine": 7,
"endLine": 28,
"imports": [
"import axios from \"axios\";"
]
},
{
"id": "",
"content": "async function findGIF(query: string): Promise<string | null> {\n const giphyApiKey = process.env.GIPHY_API_KEY;\n if (!giphyApiKey || !query.trim()) return null;\n\n try {\n const response = await axios.get<GiphyResponse>(\n \"https://api.giphy.com/v1/gifs/search\",\n {\n params: {\n api_key: giphyApiKey,\n q: query,\n limit: 1,\n },\n },\n );\n\n return response.data.data[0]?.images.fixed_height.url ?? null;\n } catch (error) {\n console.error(\"Failed to find GIF for review comment\", error);\n return null;\n }\n}",
"filePath": "app/worker-service/services/gif.service.ts",
"chunkIndex": 3,
"nodeType": "function",
"symbolName": "findGIF",
"startLine": 7,
"endLine": 28,
"imports": [
"import axios from \"axios\";"
]
},
{
"id": "",
"content": "const giphyApiKey = process.env.GIPHY_API_KEY;",
"filePath": "app/worker-service/services/gif.service.ts",
"chunkIndex": 4,
"nodeType": "variable",
"symbolName": "giphyApiKey",
"startLine": 8,
"endLine": 8,
"imports": [
"import axios from \"axios\";"
]
},
{
"id": "",
"content": "const response = await axios.get<GiphyResponse>(\n \"https://api.giphy.com/v1/gifs/search\",\n {\n params: {\n api_key: giphyApiKey,\n q: query,\n limit: 1,\n },\n },\n );",
"filePath": "app/worker-service/services/gif.service.ts",
"chunkIndex": 5,
"nodeType": "variable",
"symbolName": "response",
"startLine": 12,
"endLine": 21,
"imports": [
"import axios from \"axios\";"
]
}
]
1 change: 1 addition & 0 deletions Server/app/worker-service/Examples-1/enrichedChunk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"// File: app/worker-service/services/gif.service.ts\n// Symbol: response (variable)\n// Lines: 12-21\n// Imports: import axios from \"axios\";\nconst response = await axios.get<GiphyResponse>(\n \"https://api.giphy.com/v1/gifs/search\",\n {\n params: {\n api_key: giphyApiKey,\n q: query,\n limit: 1,\n },\n },\n );"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"header": [
"// File: app/worker-service/services/gif.service.ts",
"// Symbol: response (variable)",
"// Lines: 12-21",
"// Imports: import axios from \"axios\";"
],
"content": "const response = await axios.get<GiphyResponse>(\n \"https://api.giphy.com/v1/gifs/search\",\n {\n params: {\n api_key: giphyApiKey,\n q: query,\n limit: 1,\n },\n },\n );"
}
3 changes: 3 additions & 0 deletions Server/app/worker-service/Examples-1/imports.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"import axios from \"axios\";"
]
4 changes: 4 additions & 0 deletions Server/app/worker-service/Examples-1/mapNodeType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tsType": "lexical_declaration",
"mapped": "variable"
}
Loading
Loading