mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
refactor: move dashbot inside apidash
This commit is contained in:
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,6 +1,6 @@
|
||||
import 'package:apidash_design_system/apidash_design_system.dart'
|
||||
show kVSpacer20, kVSpacer16, kVSpacer10;
|
||||
import 'package:dashbot/core/utils/dashbot_icons.dart';
|
||||
import '../../utils/dashbot_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DashbotDefaultPage extends StatelessWidget {
|
||||
@@ -6,4 +6,4 @@ import '../model/dashbot_request_context.dart';
|
||||
/// The host app should override this provider at the Dashbot subtree.
|
||||
final dashbotRequestContextProvider = Provider<DashbotRequestContext?>(
|
||||
(ref) => null,
|
||||
);
|
||||
);
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:dashbot/features/chat/view/pages/dashbot_chat_page.dart';
|
||||
import 'package:dashbot/features/chat/models/chat_models.dart';
|
||||
import '../../features/chat/view/pages/dashbot_chat_page.dart';
|
||||
import '../../features/chat/models/chat_models.dart';
|
||||
|
||||
import 'dashbot_routes.dart';
|
||||
import '../common/pages/dashbot_default_page.dart';
|
||||
@@ -2,10 +2,8 @@ import 'package:flutter/widgets.dart';
|
||||
|
||||
class DashbotIcons {
|
||||
DashbotIcons._();
|
||||
static String get dashbotIcon1 =>
|
||||
'packages/dashbot/assets/dashbot_icon_1.png';
|
||||
static String get dashbotIcon2 =>
|
||||
'packages/dashbot/assets/dashbot_icon_2.png';
|
||||
static String get dashbotIcon1 => 'assets/dashbot/dashbot_icon_1.png';
|
||||
static String get dashbotIcon2 => 'assets/dashbot/dashbot_icon_2.png';
|
||||
|
||||
static Image getDashbotIcon1({double? width, double? height, BoxFit? fit}) {
|
||||
return Image.asset(dashbotIcon1, width: width, height: height, fit: fit);
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:apidash_design_system/apidash_design_system.dart';
|
||||
import 'package:dashbot/core/utils/dashbot_icons.dart';
|
||||
import 'core/utils/dashbot_icons.dart';
|
||||
|
||||
import 'core/providers/dashbot_window_notifier.dart';
|
||||
import 'core/providers/dashbot_request_provider.dart';
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:dashbot/features/chat/models/chat_models.dart';
|
||||
import 'package:dashbot/features/chat/view/widgets/chat_bubble.dart';
|
||||
import 'package:dashbot/features/chat/viewmodel/chat_viewmodel.dart';
|
||||
import '../../models/chat_models.dart';
|
||||
import '../widgets/chat_bubble.dart';
|
||||
import '../../viewmodel/chat_viewmodel.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:apidash_design_system/tokens/tokens.dart';
|
||||
import 'package:dashbot/core/utils/dashbot_icons.dart';
|
||||
import '../../../../core/utils/dashbot_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:dashbot/core/utils/dashbot_icons.dart';
|
||||
import '../../../../core/utils/dashbot_icons.dart';
|
||||
|
||||
import '../../../../core/routes/dashbot_routes.dart';
|
||||
import 'package:apidash_design_system/tokens/measurements.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:apidash/dashbot/dashbot.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:dashbot/dashbot.dart';
|
||||
|
||||
import 'providers.dart';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:apidash_design_system/apidash_design_system.dart';
|
||||
import 'package:dashbot/dashbot.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:apidash/providers/providers.dart';
|
||||
import 'package:apidash/widgets/widgets.dart';
|
||||
import 'package:apidash/consts.dart';
|
||||
import '../dashbot/dashbot.dart';
|
||||
import 'common_widgets/common_widgets.dart';
|
||||
import 'envvar/environment_page.dart';
|
||||
import 'home_page/home_page.dart';
|
||||
|
||||
31
packages/dashbot/.gitignore
vendored
31
packages/dashbot/.gitignore
vendored
@@ -1,31 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
|
||||
/pubspec.lock
|
||||
**/doc/api/
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
build/
|
||||
@@ -1,3 +0,0 @@
|
||||
## 0.0.1
|
||||
|
||||
* TODO: Describe initial release.
|
||||
@@ -1 +0,0 @@
|
||||
TODO: Add your license here.
|
||||
@@ -1,39 +0,0 @@
|
||||
<!--
|
||||
This README describes the package. If you publish this package to pub.dev,
|
||||
this README's contents appear on the landing page for your package.
|
||||
|
||||
For information about how to write a good package README, see the guide for
|
||||
[writing package pages](https://dart.dev/tools/pub/writing-package-pages).
|
||||
|
||||
For general information about developing packages, see the Dart guide for
|
||||
[creating packages](https://dart.dev/guides/libraries/create-packages)
|
||||
and the Flutter guide for
|
||||
[developing packages and plugins](https://flutter.dev/to/develop-packages).
|
||||
-->
|
||||
|
||||
TODO: Put a short description of the package here that helps potential users
|
||||
know whether this package might be useful for them.
|
||||
|
||||
## Features
|
||||
|
||||
TODO: List what your package can do. Maybe include images, gifs, or videos.
|
||||
|
||||
## Getting started
|
||||
|
||||
TODO: List prerequisites and provide or point to information on how to
|
||||
start using the package.
|
||||
|
||||
## Usage
|
||||
|
||||
TODO: Include short and useful examples for package users. Add longer examples
|
||||
to `/example` folder.
|
||||
|
||||
```dart
|
||||
const like = 'sample';
|
||||
```
|
||||
|
||||
## Additional information
|
||||
|
||||
TODO: Tell users more about the package: where to find more information, how to
|
||||
contribute to the package, how to file issues, what response they can expect
|
||||
from the package authors, and more.
|
||||
@@ -1,4 +0,0 @@
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
@@ -1,69 +0,0 @@
|
||||
name: dashbot
|
||||
description: "A new Flutter package project."
|
||||
version: 0.0.1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: ^3.7.2
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
http: ^1.3.0
|
||||
apidash_design_system:
|
||||
path: ../apidash_design_system
|
||||
apidash_core:
|
||||
path: ../apidash_core
|
||||
genai:
|
||||
path: ../genai
|
||||
flutter_riverpod: ^2.5.1
|
||||
riverpod_annotation: ^2.5.1
|
||||
flutter_markdown: ^0.7.7+1
|
||||
fpdart: ^1.1.1
|
||||
nanoid: ^1.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^5.0.0
|
||||
riverpod_lint: ^2.5.1
|
||||
riverpod_generator: ^2.5.1
|
||||
custom_lint: ^0.7.3
|
||||
build_runner: ^2.4.12
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter packages.
|
||||
flutter:
|
||||
# To add assets to your package, add an assets section, like this:
|
||||
assets:
|
||||
- assets/dashbot_icon_1.png
|
||||
- assets/dashbot_icon_2.png
|
||||
#
|
||||
# For details regarding assets in packages, see
|
||||
# https://flutter.dev/to/asset-from-package
|
||||
#
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/to/resolution-aware-images
|
||||
|
||||
# To add custom fonts to your package, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
# list giving the asset and other descriptors for the font. For
|
||||
# example:
|
||||
# fonts:
|
||||
# - family: Schyler
|
||||
# fonts:
|
||||
# - asset: fonts/Schyler-Regular.ttf
|
||||
# - asset: fonts/Schyler-Italic.ttf
|
||||
# style: italic
|
||||
# - family: Trajan Pro
|
||||
# fonts:
|
||||
# - asset: fonts/TrajanPro.ttf
|
||||
# - asset: fonts/TrajanPro_Bold.ttf
|
||||
# weight: 700
|
||||
#
|
||||
# For details regarding fonts in packages, see
|
||||
# https://flutter.dev/to/font-from-package
|
||||
@@ -1,20 +0,0 @@
|
||||
# melos_managed_dependency_overrides: apidash_core,apidash_design_system,better_networking,curl_parser,genai,har,insomnia_collection,postman,seed
|
||||
dependency_overrides:
|
||||
apidash_core:
|
||||
path: ../apidash_core
|
||||
apidash_design_system:
|
||||
path: ../apidash_design_system
|
||||
better_networking:
|
||||
path: ../better_networking
|
||||
curl_parser:
|
||||
path: ../curl_parser
|
||||
genai:
|
||||
path: ../genai
|
||||
har:
|
||||
path: ../har
|
||||
insomnia_collection:
|
||||
path: ../insomnia_collection
|
||||
postman:
|
||||
path: ../postman
|
||||
seed:
|
||||
path: ../seed
|
||||
@@ -1,5 +0,0 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('adds one to input values', () {});
|
||||
}
|
||||
@@ -23,7 +23,7 @@ packages:
|
||||
path: "../../better_networking"
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.0.1"
|
||||
version: "0.0.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
98
pubspec.lock
98
pubspec.lock
@@ -104,12 +104,12 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.9"
|
||||
better_networking:
|
||||
dependency: transitive
|
||||
dependency: "direct overridden"
|
||||
description:
|
||||
path: "packages/better_networking"
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.0.1"
|
||||
version: "0.0.2"
|
||||
bidi:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -198,6 +198,30 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.10.1"
|
||||
cached_network_image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cached_network_image
|
||||
sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.1"
|
||||
cached_network_image_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cached_network_image_platform_interface
|
||||
sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.1"
|
||||
cached_network_image_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cached_network_image_web
|
||||
sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
carousel_slider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -577,6 +601,14 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_cache_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_cache_manager
|
||||
sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.4.1"
|
||||
flutter_code_editor:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1188,6 +1220,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
octo_image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: octo_image
|
||||
sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
ollama_dart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1688,14 +1728,54 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
sqflite:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite
|
||||
sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
sqflite_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_android
|
||||
sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2+2"
|
||||
sqflite_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_common
|
||||
sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.6"
|
||||
sqflite_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_darwin
|
||||
sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
sqflite_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_platform_interface
|
||||
sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
stac:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: stac
|
||||
sha256: "9c24c0cb546ab04bf324c17451ad31181cb98e284a489f690a6f381b7a77e47a"
|
||||
sha256: "83d003eb881f7592f27de8ab518a9cf683c641d8643f09d654aa6637a8ae6495"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.0"
|
||||
version: "1.0.0-dev.6"
|
||||
stac_framework:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1704,6 +1784,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
stac_logger:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stac_logger
|
||||
sha256: bc3c1cc486d59d2378c1e18bfd9bfa078be564b58d4ae2b3898633c05a02df26
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -2098,5 +2186,5 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
sdks:
|
||||
dart: ">=3.8.0 <3.999.0"
|
||||
dart: ">=3.9.0 <3.999.0"
|
||||
flutter: ">=3.35.0"
|
||||
|
||||
@@ -66,7 +66,7 @@ dependencies:
|
||||
scrollable_positioned_list: ^0.3.8
|
||||
share_plus: ^10.1.4
|
||||
shared_preferences: ^2.5.2
|
||||
stac: ^0.11.0
|
||||
stac: ^1.0.0-dev.6
|
||||
url_launcher: ^6.2.5
|
||||
uuid: ^4.5.0
|
||||
vector_graphics_compiler: ^1.1.9+1
|
||||
@@ -83,6 +83,8 @@ dependency_overrides:
|
||||
pdf_widget_wrapper: ^1.0.4
|
||||
web: ^1.1.1
|
||||
freezed_annotation: ^2.0.3
|
||||
better_networking:
|
||||
path: packages/better_networking
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'dart:ui';
|
||||
import 'package:dashbot/core/model/dashbot_window_model.dart';
|
||||
import 'package:dashbot/core/providers/dashbot_window_notifier.dart';
|
||||
import 'package:apidash/dashbot/core/model/dashbot_window_model.dart';
|
||||
import 'package:apidash/dashbot/dashbot.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import '../../../../test/providers/helpers.dart';
|
||||
import 'helpers.dart';
|
||||
|
||||
void main() {
|
||||
const testScreenSize = Size(1200, 800);
|
||||
Reference in New Issue
Block a user