多🌹444收拾收拾计算机视觉手机手机手机手机4大尺寸惆怅长岑长
??????????????????????????С??????????????P??????????????????????????????????????????????????????^??????????
????j??????????
? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!database/migrations/2025_09_01_061700_add_shared_uuid_model_slug_to_user_openai_chat_messages.php 0000644 00000001431 15266620454 0026602 0 ustar 00 uuid('shared_uuid')->nullable()->after('id')->index();
$table->string('model_slug')->nullable()->after('shared_uuid')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('user_openai_chat_messages', function (Blueprint $table) {
$table->dropColumn('shared_uuid');
$table->dropColumn('model_slug');
});
}
};
extension.json 0000644 00000000205 15266620454 0007462 0 ustar 00 {
"name": "MultiModel",
"type": "extension",
"version": "1.2.0",
"description": "MultiModel extension for MagicAI"
}
System/Models/.gitkeep 0000644 00000000016 15266620454 0010713 0 ustar 00 *
!.gitignore
System/MultiModelServiceProvider.php 0000644 00000006745 15266620454 0013676 0 ustar 00
*
* @note When you create a new service provider, make sure to add it to the "MarketplaceServiceProvider". Otherwise, your Laravel application won’t recognize this provider, and the related functions won’t work properly.
* @note If you want to perform a specific action when an extension is uninstalled, you can use the UninstallExtensionServiceProviderInterface. By implementing this interface, you can define custom operations that will be triggered during the uninstallation of the extension.
* @note The registerKey() method is used to provide a unique identifier for the extension, which is essential for the healthy check and other functionalities.
*/
class MultiModelServiceProvider extends ServiceProvider implements ExtensionRegisterKeyProviderInterface, UninstallExtensionServiceProviderInterface
{
public function register(): void
{
$this->registerConfig();
}
public function boot(Kernel $kernel): void
{
$this->registerTranslations()
->registerViews()
->registerRoutes()
->registerMigrations()
->publishAssets()
->registerComponents();
}
public function registerComponents(): static
{
// $this->loadViewComponentsAs('multi-model', []);
return $this;
}
public function publishAssets(): static
{
$this->publishes([
// __DIR__ . '/../resources/assets/js' => public_path('vendor/multimodel/js'),
// __DIR__ . '/../resources/assets/images' => public_path('vendor/multimodel/images'),
], 'extension');
return $this;
}
public function registerConfig(): static
{
$this->mergeConfigFrom(__DIR__ . '/../config/multimodel.php', 'multi-model');
return $this;
}
protected function registerTranslations(): static
{
$this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'multi-model');
return $this;
}
public function registerViews(): static
{
$this->loadViewsFrom([__DIR__ . '/../resources/views'], 'multi-model');
return $this;
}
public function registerMigrations(): static
{
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
return $this;
}
private function registerRoutes(): static
{
$this->router()
->group([
'middleware' => ['web', 'auth'],
'prefix' => 'dashboard/user/multimodel',
'controller' => MultiModelController::class,
], function (Router $router) {
$router->post('/accept-response', 'acceptResponse')->name('prefer');
});
return $this;
}
private function router(): Router|Route
{
return $this->app['router'];
}
public static function uninstall(): void
{
// TODO: Implement uninstall() method.
}
public function registerKey(): string
{
return 'multi-model';
}
}
System/Http/Controllers/MultiModelController.php 0000644 00000002143 15266620454 0016117 0 ustar 00 validate([
'messageId' => 'required|integer|exists:user_openai_chat_messages,id',
]);
// Retrieve the message
$message = UserOpenaiChatMessage::find($validated['messageId']);
if (! $message) {
return response()->json(['error' => 'Message not found'], 404);
}
// Delete other messages with the same shared_uuid
$deletedCount = UserOpenaiChatMessage::where('shared_uuid', $message->shared_uuid)
->where('id', '!=', $message->id)
->delete();
$message->shared_uuid = null;
$message->save();
return response()->json([
'success' => true,
'deleted' => $deletedCount,
]);
}
}
System/Http/Requests/.gitkeep 0000644 00000000016 15266620454 0012222 0 ustar 00 *
!.gitignore
System/Http/Resources/.gitkeep 0000644 00000000016 15266620454 0012361 0 ustar 00 *
!.gitignore
resources/views/settings.blade.php 0000644 00000000564 15266620454 0013351 0 ustar 00