Skip to content

Commit 7377751

Browse files
Merge pull request #13 from bootstrapguru/dev
Dexor 1.1
2 parents 2140e02 + 8eba87d commit 7377751

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2883
-648
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve the project
4+
title: "[Bug Report]: [Title]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Describe the Bug
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
## To Reproduce
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
## Expected Behavior
21+
<!-- A clear and concise description of what you expected to happen. -->
22+
23+
## Screenshots
24+
<!-- If applicable, add screenshots to help explain your problem. -->
25+
26+
## Desktop (please complete the following information):
27+
- OS: [e.g. Windows, macOS, Linux]
28+
- Terminal: [e.g. bash, zsh, cmd, powershell]
29+
- Version [e.g. 0.1.2]
30+
31+
## Additional Context
32+
<!-- Add any other context about the problem here. -->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Enhancement Request
3+
about: Suggest an improvement or optimization for this project
4+
title: "[Enhancement]: [Title]"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Summary
11+
<!-- Provide a summary of the enhancement you would like to see implemented. -->
12+
13+
## Current Behavior
14+
<!-- Describe the current behavior that you think needs improvement. -->
15+
16+
## Desired Behavior
17+
<!-- Describe the behavior or feature you would like to see. -->
18+
19+
## Suggested Solution
20+
<!-- Suggest your solution or improvement. -->
21+
22+
## Additional Context
23+
<!-- Provide any other context or screenshots related to the enhancement request here. -->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or idea for this project
4+
title: "[Feature Request]: [Title]"
5+
labels: feature request
6+
assignees: ''
7+
8+
---
9+
10+
## Summary
11+
<!-- Provide a summary of the feature you would like to see implemented. -->
12+
13+
## Motivation
14+
<!-- Why do you want this feature? What problem does it solve? Why is it important to have this feature? -->
15+
16+
## Detailed Description
17+
<!-- Provide a detailed description of the feature. Include any benefits, goals, and expected outcomes. -->
18+
19+
## Alternatives
20+
<!-- Are there any alternative solutions or features you've considered? If so, provide those details here. -->
21+
22+
## Additional Context
23+
<!-- Provide any other context or screenshots about the feature request here. -->

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# 🤖 Droid
1+
# 🤖 Dexor
22

3-
Welcome to **Droid**, your trusty companion for automating and streamlining your development tasks. Droid is here to help you stay productive by automating repetitive tasks, identifying and fixing bugs, writing comprehensive test cases, and maintaining a consistent codebase. Checkout the [documentation](https://docs.droids.dev/) to get started!
3+
Welcome to **Dexor**, your trusty companion for automating and streamlining your development tasks. Dexor is here to help you stay productive by automating repetitive tasks, identifying and fixing bugs, writing comprehensive test cases, and maintaining a consistent codebase. Checkout the [documentation](https://docs.dexors.dev/) to get started!
44

55
Checkout the youtube video [here](https://youtu.be/oLmbafcHCKg)
66

77
<p align="center">
8-
<a href="https://packagist.org/packages/bootstrapguru/droid"><img src="https://img.shields.io/packagist/dt/bootstrapguru/droid.svg" alt="Total Downloads" /></a>
9-
<a href="https://packagist.org/packages/bootstrapguru/droid"><img src="https://img.shields.io/packagist/v/bootstrapguru/droid.svg?label=stable" alt="Latest Stable Version" /></a>
10-
<a href="https://packagist.org/packages/bootstrapguru/droid"><img src="https://img.shields.io/packagist/l/bootstrapguru/droid.svg" alt="License" /></a>
8+
<a href="https://packagist.org/packages/bootstrapguru/dexor"><img src="https://img.shields.io/packagist/dt/bootstrapguru/dexor.svg" alt="Total Downloads" /></a>
9+
<a href="https://packagist.org/packages/bootstrapguru/dexor"><img src="https://img.shields.io/packagist/v/bootstrapguru/dexor.svg?label=stable" alt="Latest Stable Version" /></a>
10+
<a href="https://packagist.org/packages/bootstrapguru/dexor"><img src="https://img.shields.io/packagist/l/bootstrapguru/dexor.svg" alt="License" /></a>
1111
</p>
12-
<img src="https://raw.githubusercontent.com/bootstrapguru/droid.dev/main/resources/images/droid.webp">
12+
<img src="https://raw.githubusercontent.com/bootstrapguru/dexor.dev/main/resources/images/dexor.webp">
1313

1414
## Documentation
1515

16-
For full documentation, getting started guides, and advanced usage, please visit [docs.droids.dev](https://docs.droids.dev/).
16+
For full documentation, getting started guides, and advanced usage, please visit [docs.dexors.dev](https://docs.dexors.dev/).
1717

1818
## License
1919

20-
Droid is an open-source software licensed under the GPL v3 license.
20+
Dexor is an open-source software licensed under the GPL v3 license.

app/Commands/DroidCommand.php

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@
33
namespace App\Commands;
44

55
use App\Services\ChatAssistant;
6+
use App\Tools\ExecuteCommand;
67
use App\Utils\OnBoardingSteps;
78
use Exception;
89
use Illuminate\Console\Command;
910

1011
use function Termwind\ask;
11-
use function Termwind\render;
1212

13-
class DroidCommand extends Command
13+
class DexorCommand extends Command
1414
{
15-
public $signature = 'droid';
15+
public $signature = 'dexor {--new : Create a new assistant}';
1616

17-
public $description = 'Allows you to create/update a feature';
17+
public $description = 'Allows you to create/update a feature, run commands, and create a new assistant';
18+
19+
public function __construct(
20+
private readonly ChatAssistant $chatAssistant,
21+
private readonly ExecuteCommand $executeCommand
22+
) {
23+
parent::__construct();
24+
}
1825

1926
/**
2027
* @throws Exception
@@ -26,12 +33,11 @@ public function handle(): int
2633
return self::FAILURE;
2734
}
2835

29-
$chatAssistant = new ChatAssistant;
30-
$thread = $chatAssistant->createThread();
36+
if ($this->option('new')) {
37+
$this->chatAssistant->createNewAssistant();
38+
}
3139

32-
render(view('assistant', [
33-
'answer' => 'How can I help you today?',
34-
]));
40+
$thread = $this->chatAssistant->createThread();
3541

3642
while (true) {
3743
$message = ask('<span class="mt-1 mx-1">🍻:</span>');
@@ -40,7 +46,11 @@ public function handle(): int
4046
break;
4147
}
4248

43-
$chatAssistant->getAnswer($thread, $message);
49+
if (str_starts_with($message, '/')) {
50+
$this->executeCommand->handle(substr($message, 1));
51+
} else {
52+
$this->chatAssistant->getAnswer($thread, $message);
53+
}
4454
}
4555

4656
return self::SUCCESS;

app/Data/AIModelData.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace App\Data;
4+
5+
use Spatie\LaravelData\Data;
6+
7+
class AIModelData extends Data
8+
{
9+
public function __construct(
10+
public string $name
11+
) {}
12+
}

app/Data/MessageData.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace App\Data;
4+
5+
use Illuminate\Support\Collection;
6+
use Spatie\LaravelData\Data;
7+
8+
class MessageData extends Data
9+
{
10+
public function __construct(
11+
public string $role,
12+
public ?string $content,
13+
public ?string $tool_call_id,
14+
public ?string $tool_name,
15+
/** @var Collection<int, ToolCallData> */
16+
public ?Collection $tool_calls
17+
) {}
18+
}

app/Data/ToolCallData.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace App\Data;
4+
5+
use Spatie\LaravelData\Data;
6+
7+
class ToolCallData extends Data
8+
{
9+
public function __construct(
10+
public string $id,
11+
public string $type,
12+
public ToolFunctionData $function,
13+
) {}
14+
}

app/Data/ToolFunctionData.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Data;
4+
5+
use Spatie\LaravelData\Data;
6+
7+
class ToolFunctionData extends Data
8+
{
9+
public function __construct(
10+
public string $name,
11+
public string $arguments,
12+
) {}
13+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace App\Integrations\Claude;
4+
5+
use Saloon\Http\Connector;
6+
use Saloon\Traits\Plugins\AcceptsJson;
7+
use Saloon\Traits\Plugins\AlwaysThrowOnErrors;
8+
use Saloon\Traits\Plugins\HasTimeout;
9+
10+
class ClaudeAIConnector extends Connector
11+
{
12+
use AcceptsJson, AlwaysThrowOnErrors, HasTimeout;
13+
14+
protected int $connectTimeout = 60;
15+
16+
protected int $requestTimeout = 120;
17+
18+
/**
19+
* The Base URL of the API
20+
*/
21+
public function resolveBaseUrl(): string
22+
{
23+
return 'https://api.anthropic.com/v1';
24+
}
25+
26+
/**
27+
* Default headers for every request
28+
*/
29+
protected function defaultHeaders(): array
30+
{
31+
return [
32+
'x-api-key' => config('aiproviders.claude.api_key'),
33+
'anthropic-version' => '2023-06-01',
34+
];
35+
}
36+
}

0 commit comments

Comments
 (0)