Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
ac74732
chore: update build files
Udhay-Adithya Aug 31, 2025
87aa4d1
chore: update flex_color_scheme version to 8.3.0
Udhay-Adithya Aug 31, 2025
a3669b1
chore: update flutter_js dependency version to 0.8.5
Udhay-Adithya Aug 31, 2025
b9cc42b
feat: add initial dashbot package implementation
Udhay-Adithya Aug 31, 2025
15e3856
refactor: remove unused old dashbot features and related files
Udhay-Adithya Aug 31, 2025
ec296a7
feat: add genai dependency to dashbot package
Udhay-Adithya Aug 31, 2025
8b74dbb
feat: add dashbot prompts and update dependencies in pubspec.yaml
Udhay-Adithya Aug 31, 2025
0def6c1
feat: dahbot chat page
Udhay-Adithya Sep 1, 2025
9e8c3b9
feat: enhance dashbot integration with context providers and ui updates
Udhay-Adithya Sep 1, 2025
07ca90f
Merge branch 'foss42:main' into dashbot-core
Udhay-Adithya Sep 1, 2025
5b6c1d5
refactor: move dashbot inside apidash
Udhay-Adithya Sep 2, 2025
aef4ee5
refactor: remove unused Dashbot context and request provider; update …
Udhay-Adithya Sep 2, 2025
c8e7c6b
refactor: remove unused Message class; update AI model handling in Ch…
Udhay-Adithya Sep 2, 2025
0490163
refactor: move generate buttons to dashbot
Udhay-Adithya Sep 3, 2025
34c6935
refactor: update Dashbot window size constraints and enhance request …
Udhay-Adithya Sep 3, 2025
ebd184e
refactor: replace TextButton with HomeScreenTaskButton in home page
Udhay-Adithya Sep 3, 2025
eaa830e
feat: integrate DashbotTab into mobile requests page
Udhay-Adithya Sep 3, 2025
9a62152
feat: integrate dashbot tab for desktop devices
Udhay-Adithya Sep 4, 2025
1c3eccd
feat: enhance EditRequestPane with segmented layout for Dashbot window
Udhay-Adithya Sep 5, 2025
7e13a48
feat: enhance EditRequestPane with segmented layout for EditGraphQLRe…
Udhay-Adithya Sep 5, 2025
6bbbe6c
feat: improve prompts
Udhay-Adithya Sep 5, 2025
e68674d
feat: implement auto-fix functionality
Udhay-Adithya Sep 5, 2025
c16665a
feat: add generate documentation functionality
Udhay-Adithya Sep 5, 2025
6ed8e00
feat: add quick auto add test to postRequestScript feature
Udhay-Adithya Sep 5, 2025
1e4f78b
feat: move generation buttons to dashbot
Udhay-Adithya Sep 8, 2025
6b4c042
feat: update default dimensions for DashbotWindowModel
Udhay-Adithya Sep 8, 2025
6a9e72c
feat: add code generation prompt
Udhay-Adithya Sep 8, 2025
eb0f4f5
feat: implement code generation method
Udhay-Adithya Sep 8, 2025
ca4a741
feat: implement code generation ui
Udhay-Adithya Sep 8, 2025
16e7b92
feat: multi-action actions with enums, upload scaffolding, and UI fac…
Udhay-Adithya Sep 15, 2025
9c76683
fix: update collection notifier to include parameter enablement
Udhay-Adithya Sep 15, 2025
38cb5eb
feat: make dashbot more friendly and explanatory wiith tasks
Udhay-Adithya Sep 15, 2025
8036d60
feat: harden curl_parser, tolerate flags, improve output, and expand …
Udhay-Adithya Sep 16, 2025
9b1c3fe
feat: implement cURL import functionality with parsing and action han…
Udhay-Adithya Sep 16, 2025
b7a7bde
feat: add openapi spec import functionality
Udhay-Adithya Sep 19, 2025
ce3248d
feat: improve ui for openapi specs feature
Udhay-Adithya Sep 20, 2025
3a4a871
feat: enhance OpenAPI insights generation with structured metadata an…
Udhay-Adithya Sep 20, 2025
fc6abd0
feat: add clear chat functionality
Udhay-Adithya Sep 20, 2025
8addcc4
refactor: split chat viewmodel to specific services
Udhay-Adithya Sep 20, 2025
61a91ae
feat: replace nanoid with getNewUuid
Udhay-Adithya Sep 20, 2025
671e421
feat: reorganize attachments provider and model structure
Udhay-Adithya Sep 20, 2025
f8d54da
feat: enhance routing and state management in Dashbot components
Udhay-Adithya Sep 20, 2025
d5915bb
refactor: Move AutoFixService, RequestApplyService, PromptBuilder, an…
Udhay-Adithya Sep 21, 2025
5796075
refactor: remove CommonLanguagesPicker and CommonLanguageButton compo…
Udhay-Adithya Sep 21, 2025
7f99822
feat: update DashbotTab navigation buttons to use ADIconButton
Udhay-Adithya Sep 21, 2025
7cdc286
feat: hide dashbot when other windows are open
Udhay-Adithya Sep 21, 2025
401d2f4
refactor: hide DashbotTab button in mobile devices
Udhay-Adithya Sep 21, 2025
5fba4bb
feat: add ai insights for curl import
Udhay-Adithya Sep 21, 2025
ec86e28
Merge branch 'main' into pr/887
animator Sep 23, 2025
9808b71
bump versions
animator Sep 23, 2025
df2d1a7
docs: add dashbot user guide
Udhay-Adithya Sep 24, 2025
4292169
docs: add images for dashbot user guide
Udhay-Adithya Sep 24, 2025
1a26380
feat: rearrange dashbot home buttons
Udhay-Adithya Sep 24, 2025
5a68c25
feat: enhance loading state management during import processes in Cha…
Udhay-Adithya Sep 24, 2025
a7ee893
feat: improve debug prompt explanation
Udhay-Adithya Sep 24, 2025
96c13e1
feat: toggle active state in dashbot window notifier on user interaction
Udhay-Adithya Sep 24, 2025
942b295
faet: add env var support for dashbot
Udhay-Adithya Sep 24, 2025
2b10325
fix: copy will now only copy explanation
Udhay-Adithya Sep 24, 2025
cf69d4e
feat: add detailed documentation on unsupported cURL flags in CurlImp…
Udhay-Adithya Sep 24, 2025
b286e34
feat: add support to fetch openapi spec from url
Udhay-Adithya Sep 24, 2025
92ea46c
feat: hide view code button for now
Udhay-Adithya Sep 24, 2025
75c0ab2
feat: add download doc button
Udhay-Adithya Sep 24, 2025
567a235
feat: enhance dashbot default page
Udhay-Adithya Sep 24, 2025
e2d7e6d
feat: update default height and adjust height clamping in DashbotWind…
Udhay-Adithya Sep 24, 2025
35fad13
feat: update chat bubble background color
Udhay-Adithya Sep 24, 2025
5149179
feat: hide dashbot fab when dashbot is open
Udhay-Adithya Sep 24, 2025
54b343d
fix: open api spec bottom modal sheet
Udhay-Adithya Sep 24, 2025
848ab29
feat: increase dashbot min height
Udhay-Adithya Sep 24, 2025
a495f7e
refactor: split dashbot action buttons
Udhay-Adithya Sep 24, 2025
ab90189
refactor: split prompts into separate files
Udhay-Adithya Sep 24, 2025
c7f7ef0
feat: add task suggestions panel in chat screen
Udhay-Adithya Sep 24, 2025
49f16e7
feat: remove back button from dashbot tab
Udhay-Adithya Sep 25, 2025
f2ce403
feat: split dashbot models
Udhay-Adithya Sep 25, 2025
066aa0f
tests: add chat model tests(cv: 100)
Udhay-Adithya Sep 25, 2025
fec92a9
fix: update api url in chat message tests
Udhay-Adithya Sep 25, 2025
0f1c0f6
tests: add tests for services(cv: 98.7)
Udhay-Adithya Sep 25, 2025
989f46e
tests: add providers tests(cv: 100)
Udhay-Adithya Sep 25, 2025
a70b825
tests: add tests for dashbot utils(cv: 100)
Udhay-Adithya Sep 25, 2025
d789a80
docs: update dashbot user guide
Udhay-Adithya Sep 25, 2025
7902a6b
fix: update openapi example url in chat message
Udhay-Adithya Sep 25, 2025
7436645
tests: add tests for dashbot action buttons(cv: 95.5)
Udhay-Adithya Sep 25, 2025
50fb3cf
feat: add dashbot widget tests(cv: 99)
Udhay-Adithya Sep 25, 2025
9a58a1f
feat: fix user chat text color
Udhay-Adithya Sep 25, 2025
e3fc474
feat: implement reactive switching in dashbot home and default page
Udhay-Adithya Sep 25, 2025
e5ef67e
feat: add copy button to code generation codeblock
Udhay-Adithya Sep 25, 2025
6abfbe0
chore: rename dashbot home page file
Udhay-Adithya Sep 25, 2025
e1481e8
feat: send a user message for each task
Udhay-Adithya Sep 25, 2025
bf11c73
feat: wipe current request data before making changes
Udhay-Adithya Sep 25, 2025
d4c4504
feat: add search functionality to opeanapi operation picker dialog
Udhay-Adithya Sep 26, 2025
f4c19c8
feat: add thumbVisibility to scrollbar
Udhay-Adithya Sep 26, 2025
896aa23
feat: implement scroll controller to scroll to the bottom
Udhay-Adithya Sep 26, 2025
efab7c1
feat: enhance cURL error messages with detailed guidance for users
Udhay-Adithya Sep 26, 2025
7c6c9b7
Update typography.dart
animator Sep 27, 2025
7fd7bb1
Update dashbot_default_page.dart
animator Sep 27, 2025
8cd9923
feat: integrate chat state management for dynamic navigation in dashbot
Udhay-Adithya Sep 26, 2025
991b2c6
feat: enhance DashbotApplyCurlButton to highlight destructive actions…
Udhay-Adithya Sep 27, 2025
ec02eb6
fix: clear chat button
Udhay-Adithya Sep 27, 2025
b840ba4
feat: create a dedicated provider for dashbot navigation
Udhay-Adithya Sep 27, 2025
86f3575
feat: remove unused openapi action button
Udhay-Adithya Sep 27, 2025
34f2ae6
fix: cleanr body and formData in curl import
Udhay-Adithya Sep 27, 2025
621835a
feat: enhance debug api error prompt structure and reporting requirem…
Udhay-Adithya Sep 27, 2025
9d5518e
feat: refine generate test cases prompt with detailed requirements an…
Udhay-Adithya Sep 27, 2025
3ba4167
fix: correct spelling of "explnation" to "explanation" across multipl…
Udhay-Adithya Sep 27, 2025
d2a5a77
feat: add a dedicated ScrollController shared between the Scrollbar a…
Udhay-Adithya Sep 27, 2025
15821a0
fix: base url creation for openapi spec
Udhay-Adithya Sep 27, 2025
dc64784
test: add test for all dashbot pages
Udhay-Adithya Sep 27, 2025
f7d972d
test: add tests for DashbotActiveRouteNotifier(cv: 100)
Udhay-Adithya Sep 27, 2025
8509498
chore: remove dashbot docs
Udhay-Adithya Sep 27, 2025
c61d051
tests: add tests for DashbotActionWidgetFactory(cv: 100)
Udhay-Adithya Sep 28, 2025
7e6032d
tests: add tests for dashbot router
Udhay-Adithya Sep 28, 2025
d641757
Merge branch 'main' into dashbot-core
animator Sep 28, 2025
6311dbb
test: improve url env service tests(cv: 97)
Udhay-Adithya Sep 28, 2025
b2a346c
refactor: remove streaming functionality from ChatRemoteRepository an…
Udhay-Adithya Sep 28, 2025
c72af24
test: add tests for chat viewmodel(cv: 50)
Udhay-Adithya Sep 28, 2025
b5931d3
Update dependencies
animator Sep 28, 2025
5e2af07
Update sdui_preview.dart
animator Sep 28, 2025
bd86a71
Update dashbot_import_now_button_test.dart
animator Sep 28, 2025
f38ee9f
Refactor DashBot
animator Sep 29, 2025
5c6869c
Update chat_bubble_test.dart
animator Sep 29, 2025
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
Binary file added assets/dashbot/dashbot_icon_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/dashbot/dashbot_icon_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/user_guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [History of Requests](https://github.com/foss42/apidash/blob/main/doc/user_guide/his_user_guide.md)
- [Environment Variables Manager](https://github.com/foss42/apidash/blob/main/doc/user_guide/env_user_guide.md)
- [How to Disable SSL for Requests](https://github.com/foss42/apidash/blob/main/doc/user_guide/disable_ssl.md)
- [Dashbot User Guide](https://github.com/foss42/apidash/blob/main/doc/user_guide/dashbot_user_guide.md)
- Import Request for cURL (Contributions Welcome!)
- [How to Run Generated Code for a Programming Language](https://github.com/foss42/apidash/blob/main/doc/user_guide/instructions_to_run_generated_code.md) (Contributions Welcome!)
- [API Dash on Mobile](https://github.com/foss42/apidash/blob/main/doc/user_guide/req_user_guide.md)
1 change: 1 addition & 0 deletions lib/consts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ const kLabelDownload = "Download";
const kLabelSaving = "Saving";
const kLabelSaved = "Saved";
const kLabelCode = "Code";
const kLabelDashBot = "DashBot";
const kLabelDuplicate = "Duplicate";
const kLabelSelect = "Select";
const kLabelContinue = "Continue";
Expand Down
56 changes: 56 additions & 0 deletions lib/dashbot/constants.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/// Role of a chat message author.
enum MessageRole { user, system }

enum ChatMessageType {
explainResponse,
debugError,
generateTest,
generateDoc,
generateCode,
importCurl,
importOpenApi,
general
}

enum ChatActionType {
updateField('update_field'),
addHeader('add_header'),
updateHeader('update_header'),
deleteHeader('delete_header'),
updateBody('update_body'),
updateUrl('update_url'),
updateMethod('update_method'),
showLanguages('show_languages'),
applyCurl('apply_curl'),
applyOpenApi('apply_openapi'),
downloadDoc('download_doc'),
other('other'),
noAction('no_action'),
uploadAsset('upload_asset');

const ChatActionType(this.text);
final String text;
}

enum ChatActionTarget {
httpRequestModel,
codegen,
test,
code,
attachment,
documentation,
}

ChatActionType chatActionTypeFromString(String s) {
return ChatActionType.values.firstWhere(
(type) => type.text == s,
orElse: () => ChatActionType.other,
);
}

ChatActionTarget chatActionTargetFromString(String s) {
return ChatActionTarget.values.firstWhere(
(target) => target.name == s,
orElse: () => ChatActionTarget.httpRequestModel,
);
}
2 changes: 0 additions & 2 deletions lib/dashbot/consts.dart

This file was deleted.

5 changes: 4 additions & 1 deletion lib/dashbot/dashbot.dart
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export 'widgets/dashbot_widget.dart';
export 'dashbot_dashboard.dart';
export 'dashbot_tab.dart';
export 'providers/providers.dart';
export 'utils/utils.dart';
220 changes: 220 additions & 0 deletions lib/dashbot/dashbot_dashboard.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
import 'package:apidash_core/apidash_core.dart';
import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:apidash/providers/providers.dart';
import 'package:apidash/screens/common_widgets/ai/ai.dart';
import 'providers/providers.dart';
import 'routes/routes.dart';
import 'utils/utils.dart';

class DashbotWindow extends ConsumerWidget {
final VoidCallback onClose;

const DashbotWindow({super.key, required this.onClose});

static final GlobalKey<NavigatorState> _dashbotNavigatorKey =
GlobalKey<NavigatorState>();

@override
Widget build(BuildContext context, WidgetRef ref) {
final windowState = ref.watch(dashbotWindowNotifierProvider);
final windowNotifier = ref.read(dashbotWindowNotifierProvider.notifier);
final settings = ref.watch(settingsProvider);
final activeRoute = ref.watch(dashbotActiveRouteProvider);

// Close the overlay when the window is not popped anymore
ref.listen(
dashbotWindowNotifierProvider.select((s) => s.isPopped),
(prev, next) {
if (prev == true && next == false) {
onClose();
}
},
);

void navigateTo(String route) {
final nav = _dashbotNavigatorKey.currentState;
if (nav == null) return;
Route? top;
nav.popUntil((r) {
top = r;
return true;
});
if (top?.settings.name == route) return;
if (route == DashbotRoutes.dashbotDefault) {
nav.popUntil((r) => r.isFirst);
} else {
nav.pushNamed(route);
}
}

ref.listen<String>(dashbotActiveRouteProvider, (prev, next) {
if (prev == next || next.isEmpty) return;
navigateTo(next);
});

return Stack(
children: [
if (!windowState.isHidden)
Positioned(
right: windowState.right,
bottom: windowState.bottom,
child: Material(
elevation: 8,
borderRadius: BorderRadius.circular(8),
child: Container(
width: windowState.width,
height: windowState.height,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerLow,
borderRadius: BorderRadius.circular(8),
),
child: Stack(
children: [
Column(
children: [
// This is to update position
GestureDetector(
onPanUpdate: (details) {
windowNotifier.updatePosition(
details.delta.dx,
details.delta.dy,
MediaQuery.of(context).size,
);
},
child: Container(
height: 50,
decoration: BoxDecoration(
color: Theme.of(context)
.colorScheme
.primaryContainer,
borderRadius: const BorderRadius.vertical(
top: Radius.circular(10),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
kHSpacer20,
DashbotIcons.getDashbotIcon1(width: 38),
kHSpacer12,
Text(
'DashBot',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Theme.of(context)
.colorScheme
.surface,
),
),
kHSpacer4,
AIModelSelectorButton(
aiRequestModel: AIRequestModel.fromJson(
settings.defaultAIModel ?? {}),
useRootNavigator: true,
onDialogOpen: () => ref
.read(dashbotWindowNotifierProvider
.notifier)
.hide(),
onDialogClose: () => ref
.read(dashbotWindowNotifierProvider
.notifier)
.show(),
onModelUpdated: (d) {
ref
.read(settingsProvider.notifier)
.update(
defaultAIModel: d.copyWith(
modelConfigs: [],
stream: null,
systemPrompt: '',
userPrompt: '').toJson());
},
),
],
),
Spacer(),
IconButton(
icon: Icon(
Icons.open_in_new,
color:
Theme.of(context).colorScheme.onPrimary,
),
onPressed: () {
ref
.read(dashbotWindowNotifierProvider
.notifier)
.togglePopped();
},
),
IconButton(
icon: Icon(
Icons.close,
color:
Theme.of(context).colorScheme.onPrimary,
),
onPressed: onClose,
),
],
),
),
),
Expanded(
child: Navigator(
key: _dashbotNavigatorKey,
initialRoute: activeRoute,
onGenerateRoute: generateRoute,
),
),
],
),
// This is to update size
Positioned(
left: 0,
top: 0,
child: GestureDetector(
onPanUpdate: (details) {
windowNotifier.updateSize(
details.delta.dx,
details.delta.dy,
MediaQuery.of(context).size,
);
},
child: MouseRegion(
cursor: SystemMouseCursors.resizeUpLeft,
child: Container(
padding: EdgeInsets.only(top: 6, left: 1),
width: 20,
height: 20,
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(8),
),
color: Theme.of(context)
.colorScheme
.primaryContainer
.withValues(alpha: 0.7),
),
child: Icon(
Icons.drag_indicator_rounded,
size: 16,
color:
Theme.of(context).colorScheme.surfaceBright,
),
),
),
),
),
],
),
),
),
),
],
);
}
}
Loading