27 lines
876 B
TypeScript
27 lines
876 B
TypeScript
|
|
import client from '../client'
|
||
|
|
import type { AndroidToolResponse } from '../types/android'
|
||
|
|
|
||
|
|
function postTool(url: string, input_text: string) {
|
||
|
|
return client.post<AndroidToolResponse>(url, { input_text }).then((r) => r.data)
|
||
|
|
}
|
||
|
|
|
||
|
|
export function analyzeAndroidCrashLog(input_text: string) {
|
||
|
|
return postTool('/api/android/crash-log/analyze', input_text)
|
||
|
|
}
|
||
|
|
|
||
|
|
export function analyzeGradleConflict(input_text: string) {
|
||
|
|
return postTool('/api/android/gradle-conflict/analyze', input_text)
|
||
|
|
}
|
||
|
|
|
||
|
|
export function generatePerfOptimize(input_text: string) {
|
||
|
|
return postTool('/api/android/perf-optimize/generate', input_text)
|
||
|
|
}
|
||
|
|
|
||
|
|
export function generateTechReview(input_text: string) {
|
||
|
|
return postTool('/api/android/tech-review/generate', input_text)
|
||
|
|
}
|
||
|
|
|
||
|
|
export function generateCodeReview(input_text: string) {
|
||
|
|
return postTool('/api/android/code-review/generate', input_text)
|
||
|
|
}
|