mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 02:07:00 +08:00
lint fixes
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: use_key_in_widget_constructors, use_full_hex_values_for_flutter_colors
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: use_key_in_widget_constructors
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:apidash/templates/templates.dart';
|
||||
import 'package:apidash_core/apidash_core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StacGenBot extends AIAgent {
|
||||
@override
|
||||
@@ -18,7 +19,7 @@ class StacGenBot extends AIAgent {
|
||||
try {
|
||||
jsonDecode(aiResponse);
|
||||
} catch (e) {
|
||||
print("JSON PARSE ERROR: ${e}");
|
||||
debugPrint("JSON PARSE ERROR: $e");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:apidash/templates/templates.dart';
|
||||
import 'package:apidash_core/apidash_core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StacModifierBot extends AIAgent {
|
||||
@override
|
||||
@@ -18,7 +19,7 @@ class StacModifierBot extends AIAgent {
|
||||
try {
|
||||
jsonDecode(aiResponse);
|
||||
} catch (e) {
|
||||
print("JSON PARSE ERROR: ${e}");
|
||||
debugPrint("JSON PARSE ERROR: $e");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:apidash/services/agentic_services/agent_caller.dart';
|
||||
import 'package:apidash/services/agentic_services/agents/agents.dart';
|
||||
import 'package:apidash/templates/tool_templates.dart';
|
||||
import 'package:apidash_core/apidash_core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
Future<String?> generateSDUICodeFromResponse({
|
||||
@@ -22,23 +23,23 @@ Future<String?> generateSDUICodeFromResponse({
|
||||
}),
|
||||
),
|
||||
]);
|
||||
final SA = step1Res[0]?['SEMANTIC_ANALYSIS'];
|
||||
final IR = step1Res[1]?['INTERMEDIATE_REPRESENTATION'];
|
||||
final sa = step1Res[0]?['SEMANTIC_ANALYSIS'];
|
||||
final ir = step1Res[1]?['INTERMEDIATE_REPRESENTATION'];
|
||||
|
||||
if (SA == null || IR == null) {
|
||||
if (sa == null || ir == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
print("Semantic Analysis: $SA");
|
||||
print("Intermediate Representation: $IR");
|
||||
debugPrint("Semantic Analysis: $sa");
|
||||
debugPrint("Intermediate Representation: $ir");
|
||||
|
||||
final sduiCode = await APIDashAgentCaller.instance.call(
|
||||
StacGenBot(),
|
||||
ref: ref,
|
||||
input: AgentInputs(variables: {
|
||||
'VAR_RAW_API_RESPONSE': apiResponse,
|
||||
'VAR_INTERMEDIATE_REPR': IR,
|
||||
'VAR_SEMANTIC_ANALYSIS': SA,
|
||||
'VAR_INTERMEDIATE_REPR': ir,
|
||||
'VAR_SEMANTIC_ANALYSIS': sa,
|
||||
}),
|
||||
);
|
||||
final stacCode = sduiCode?['STAC']?.toString();
|
||||
@@ -62,8 +63,8 @@ Future<String?> modifySDUICodeUsingPrompt({
|
||||
'VAR_CLIENT_REQUEST': modificationRequest,
|
||||
}),
|
||||
);
|
||||
final SDUI = res?['STAC'];
|
||||
return SDUI;
|
||||
final sdui = res?['STAC'];
|
||||
return sdui;
|
||||
}
|
||||
|
||||
Future<String?> generateAPIToolUsingRequestData({
|
||||
|
||||
Reference in New Issue
Block a user