- Forked from Godot Engine 4.7-dev (MIT License) - Rebranded to AeThex Engine with cyan/purple theme - Added AI-powered development assistant module - Integrated Claude API for code completion & error fixing - Custom hexagon logo and branding - Multi-platform CI/CD (Windows, Linux, macOS) - Built Linux editor binary (151MB) - Complete source code with all customizations Tech Stack: - C++ game engine core - AI Module: Claude 3.5 Sonnet integration - Build: SCons, 14K+ source files - License: MIT (Godot) + Custom (AeThex features) Ready for Windows build via GitHub Actions!
72 lines
2.1 KiB
C++
72 lines
2.1 KiB
C++
/**************************************************************************/
|
|
/* ai_assistant.h */
|
|
/**************************************************************************/
|
|
/* This file is part of: */
|
|
/* AETHEX ENGINE */
|
|
/* https://aethex.io */
|
|
/**************************************************************************/
|
|
|
|
#ifndef AI_ASSISTANT_H
|
|
#define AI_ASSISTANT_H
|
|
|
|
#include "api/ai_api_client.h"
|
|
#include "core/object/object.h"
|
|
#include "core/templates/hash_map.h"
|
|
#include "core/variant/variant.h"
|
|
|
|
class AIAssistant : public Object {
|
|
GDCLASS(AIAssistant, Object);
|
|
|
|
private:
|
|
static AIAssistant *singleton;
|
|
Ref<AIAPIClient> api_client;
|
|
HashMap<String, String> response_cache;
|
|
bool initialized = false;
|
|
String api_key;
|
|
|
|
// Internal methods
|
|
String _get_cached_response(const String &p_prompt);
|
|
void _cache_response(const String &p_prompt, const String &p_response);
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
public:
|
|
enum CompletionType {
|
|
COMPLETION_TYPE_CODE,
|
|
COMPLETION_TYPE_DOCUMENTATION,
|
|
COMPLETION_TYPE_EXPLANATION,
|
|
COMPLETION_TYPE_FIX
|
|
};
|
|
|
|
// Initialization
|
|
Error initialize(const String &p_api_key = "");
|
|
bool is_initialized() const { return initialized; }
|
|
|
|
// Code assistance
|
|
String get_code_completion(const String &p_context, const PackedStringArray &p_recent_code);
|
|
String explain_code(const String &p_code_block);
|
|
String fix_error(const String &p_error_message, const String &p_code_context);
|
|
|
|
// Documentation
|
|
String generate_function_docs(const String &p_function_signature);
|
|
String generate_class_docs(const String &p_class_code);
|
|
|
|
// Natural language
|
|
String natural_language_to_code(const String &p_description, const String &p_context);
|
|
|
|
// Settings
|
|
void set_api_key(const String &p_key);
|
|
String get_api_key() const;
|
|
void clear_cache();
|
|
|
|
// Singleton access
|
|
static AIAssistant *get_singleton();
|
|
|
|
AIAssistant();
|
|
~AIAssistant();
|
|
};
|
|
|
|
VARIANT_ENUM_CAST(AIAssistant::CompletionType);
|
|
|
|
#endif // AI_ASSISTANT_H
|