diff --git a/lib/screens/common_widgets/agentic_ui_features/ai_ui_designer/generate_ui_dialog.dart b/lib/screens/common_widgets/agentic_ui_features/ai_ui_designer/generate_ui_dialog.dart index c82f859d..33967d8f 100644 --- a/lib/screens/common_widgets/agentic_ui_features/ai_ui_designer/generate_ui_dialog.dart +++ b/lib/screens/common_widgets/agentic_ui_features/ai_ui_designer/generate_ui_dialog.dart @@ -1,6 +1,6 @@ import 'package:apidash/consts.dart'; import 'package:apidash/providers/collection_providers.dart'; -import 'package:apidash/utils/agent_utils.dart'; +import 'package:apidash/services/agentic_services/apidash_agent_calls.dart'; import 'package:apidash/widgets/widget_sending.dart'; import 'package:apidash_design_system/apidash_design_system.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/common_widgets/agentic_ui_features/tool_generation/generate_tool_dialog.dart b/lib/screens/common_widgets/agentic_ui_features/tool_generation/generate_tool_dialog.dart index 75ec9dd8..f7f7b510 100644 --- a/lib/screens/common_widgets/agentic_ui_features/tool_generation/generate_tool_dialog.dart +++ b/lib/screens/common_widgets/agentic_ui_features/tool_generation/generate_tool_dialog.dart @@ -1,9 +1,7 @@ -import 'dart:convert'; - import 'package:apidash/apitoolgen/request_consolidator.dart'; import 'package:apidash/providers/collection_providers.dart'; import 'package:apidash/screens/common_widgets/agentic_ui_features/ai_ui_designer/generate_ui_dialog.dart'; -import 'package:apidash/utils/agent_utils.dart'; +import 'package:apidash/services/agentic_services/apidash_agent_calls.dart'; import 'package:apidash_core/apidash_core.dart'; import 'package:apidash_design_system/apidash_design_system.dart'; import 'package:flutter/material.dart'; diff --git a/lib/utils/agent_utils.dart b/lib/services/agentic_services/apidash_agent_calls.dart similarity index 100% rename from lib/utils/agent_utils.dart rename to lib/services/agentic_services/apidash_agent_calls.dart diff --git a/lib/templates/system_prompt_templates/apitool_bodygen_prompt.dart b/lib/templates/system_prompt_templates/apitool_bodygen_prompt.dart index 21a2a197..bc4f6640 100644 --- a/lib/templates/system_prompt_templates/apitool_bodygen_prompt.dart +++ b/lib/templates/system_prompt_templates/apitool_bodygen_prompt.dart @@ -1,5 +1,5 @@ const String kPromptAPIToolBodyGen = """ -YOu are an expert API Tool Format Corrector Agent +You are an expert API Tool Format Corrector Agent An API tool is a predefined or dynamically generated interface that the AI can call to perform specific external actions—such as fetching data, executing computations, or triggering real-world services—through an Application Programming Interface (API). @@ -11,7 +11,7 @@ Wherever you find this pattern replace it with the appropriate values) `TOOL_NAME`: The name of the API Tool, infer it from the function code `TOOL_DESCRIPTION`: The Description of the Tool, generate it based on the tool name `TOOL_PARAMS`: The example of parameters have been provided below, infer the parameters needed from the func body, it must be a dictionary -`REQUIRED_PARAM_NAMES`: infer waht parameters are required and add thier names in a list +`REQUIRED_PARAM_NAMES`: infer what parameters are required and add thier names in a list `INPUT_SCHEMA`: if this variable exists, then create a StructuredTool or DynamicStructuredTool schema of the input according to the language of the tool itself. this is the general format of parameters: diff --git a/lib/widgets/response_pane_header.dart b/lib/widgets/response_pane_header.dart index bb318da9..8eefcdcf 100644 --- a/lib/widgets/response_pane_header.dart +++ b/lib/widgets/response_pane_header.dart @@ -1,3 +1,4 @@ +import 'package:apidash/consts.dart'; import 'package:flutter/material.dart'; import 'package:apidash_design_system/apidash_design_system.dart'; import 'package:apidash/utils/utils.dart'; @@ -23,43 +24,39 @@ class ResponsePaneHeader extends StatelessWidget { return Padding( padding: kPv8, child: SizedBox( - // height: kHeaderHeight, - child: Column( + height: kHeaderHeight, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - kHSpacer10, - Expanded( - child: Text( - "$responseStatus: ${message ?? '-'}", - softWrap: false, - overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - fontFamily: kCodeStyle.fontFamily, - color: getResponseStatusCodeColor( - responseStatus, - brightness: Theme.of(context).brightness, - ), - ), - ), - ), - kHSpacer10, - Text( - humanizeDuration(time), - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - fontFamily: kCodeStyle.fontFamily, - color: Theme.of(context).colorScheme.secondary, + kHSpacer10, + Expanded( + child: Text( + "$responseStatus: ${message ?? '-'}", + softWrap: false, + overflow: TextOverflow.ellipsis, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontFamily: kCodeStyle.fontFamily, + color: getResponseStatusCodeColor( + responseStatus, + brightness: Theme.of(context).brightness, ), - ), - kHSpacer10, - showClearButton - ? ClearResponseButton( - onPressed: onClearResponse, - ) - : const SizedBox.shrink(), - ], + ), + ), ), + kHSpacer10, + Text( + humanizeDuration(time), + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontFamily: kCodeStyle.fontFamily, + color: Theme.of(context).colorScheme.secondary, + ), + ), + kHSpacer10, + showClearButton + ? ClearResponseButton( + onPressed: onClearResponse, + ) + : const SizedBox.shrink(), ], ), ),