iatoolkit 0.59.1__py3-none-any.whl → 0.67.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of iatoolkit might be problematic. Click here for more details.
- iatoolkit/__init__.py +2 -0
- iatoolkit/base_company.py +2 -19
- iatoolkit/common/routes.py +28 -25
- iatoolkit/common/session_manager.py +2 -0
- iatoolkit/common/util.py +17 -6
- iatoolkit/company_registry.py +1 -2
- iatoolkit/iatoolkit.py +54 -20
- iatoolkit/locales/en.yaml +167 -0
- iatoolkit/locales/es.yaml +163 -0
- iatoolkit/repositories/database_manager.py +3 -3
- iatoolkit/repositories/document_repo.py +1 -1
- iatoolkit/repositories/models.py +3 -4
- iatoolkit/repositories/profile_repo.py +0 -4
- iatoolkit/services/auth_service.py +44 -32
- iatoolkit/services/branding_service.py +35 -27
- iatoolkit/services/configuration_service.py +140 -0
- iatoolkit/services/dispatcher_service.py +20 -18
- iatoolkit/services/document_service.py +5 -2
- iatoolkit/services/excel_service.py +15 -11
- iatoolkit/services/file_processor_service.py +4 -12
- iatoolkit/services/history_service.py +8 -7
- iatoolkit/services/i18n_service.py +104 -0
- iatoolkit/services/jwt_service.py +7 -9
- iatoolkit/services/language_service.py +79 -0
- iatoolkit/services/load_documents_service.py +4 -4
- iatoolkit/services/mail_service.py +9 -4
- iatoolkit/services/onboarding_service.py +10 -4
- iatoolkit/services/profile_service.py +59 -38
- iatoolkit/services/prompt_manager_service.py +20 -16
- iatoolkit/services/query_service.py +15 -14
- iatoolkit/services/sql_service.py +6 -2
- iatoolkit/services/user_feedback_service.py +70 -29
- iatoolkit/static/js/chat_feedback_button.js +80 -0
- iatoolkit/static/js/chat_help_content.js +124 -0
- iatoolkit/static/js/chat_history_button.js +110 -0
- iatoolkit/static/js/chat_logout_button.js +36 -0
- iatoolkit/static/js/chat_main.js +32 -184
- iatoolkit/static/js/{chat_onboarding.js → chat_onboarding_button.js} +0 -1
- iatoolkit/static/js/chat_prompt_manager.js +94 -0
- iatoolkit/static/js/chat_reload_button.js +35 -0
- iatoolkit/static/styles/chat_iatoolkit.css +251 -205
- iatoolkit/static/styles/chat_modal.css +63 -95
- iatoolkit/static/styles/chat_public.css +107 -0
- iatoolkit/static/styles/landing_page.css +121 -167
- iatoolkit/templates/_company_header.html +20 -0
- iatoolkit/templates/_login_widget.html +10 -10
- iatoolkit/templates/base.html +36 -19
- iatoolkit/templates/change_password.html +24 -22
- iatoolkit/templates/chat.html +121 -93
- iatoolkit/templates/chat_modals.html +113 -74
- iatoolkit/templates/error.html +44 -8
- iatoolkit/templates/forgot_password.html +17 -15
- iatoolkit/templates/index.html +66 -81
- iatoolkit/templates/login_simulation.html +16 -5
- iatoolkit/templates/onboarding_shell.html +1 -2
- iatoolkit/templates/signup.html +22 -20
- iatoolkit/views/base_login_view.py +12 -1
- iatoolkit/views/change_password_view.py +50 -33
- iatoolkit/views/external_login_view.py +5 -11
- iatoolkit/views/file_store_api_view.py +7 -9
- iatoolkit/views/forgot_password_view.py +21 -19
- iatoolkit/views/help_content_api_view.py +54 -0
- iatoolkit/views/history_api_view.py +16 -12
- iatoolkit/views/home_view.py +61 -0
- iatoolkit/views/index_view.py +5 -34
- iatoolkit/views/init_context_api_view.py +16 -13
- iatoolkit/views/llmquery_api_view.py +38 -28
- iatoolkit/views/login_simulation_view.py +14 -2
- iatoolkit/views/login_view.py +48 -33
- iatoolkit/views/logout_api_view.py +49 -0
- iatoolkit/views/profile_api_view.py +46 -0
- iatoolkit/views/prompt_api_view.py +8 -8
- iatoolkit/views/signup_view.py +27 -25
- iatoolkit/views/{tasks_view.py → tasks_api_view.py} +10 -36
- iatoolkit/views/tasks_review_api_view.py +55 -0
- iatoolkit/views/user_feedback_api_view.py +21 -32
- iatoolkit/views/verify_user_view.py +33 -26
- {iatoolkit-0.59.1.dist-info → iatoolkit-0.67.0.dist-info}/METADATA +40 -22
- iatoolkit-0.67.0.dist-info/RECORD +120 -0
- iatoolkit-0.67.0.dist-info/licenses/LICENSE +21 -0
- iatoolkit/static/js/chat_context_reload.js +0 -54
- iatoolkit/static/js/chat_feedback.js +0 -115
- iatoolkit/static/js/chat_history.js +0 -127
- iatoolkit/static/styles/chat_info.css +0 -53
- iatoolkit/templates/_branding_styles.html +0 -53
- iatoolkit/templates/_navbar.html +0 -9
- iatoolkit/templates/header.html +0 -31
- iatoolkit/templates/test.html +0 -9
- iatoolkit/views/chat_token_request_view.py +0 -98
- iatoolkit/views/tasks_review_view.py +0 -83
- iatoolkit-0.59.1.dist-info/RECORD +0 -111
- {iatoolkit-0.59.1.dist-info → iatoolkit-0.67.0.dist-info}/WHEEL +0 -0
- {iatoolkit-0.59.1.dist-info → iatoolkit-0.67.0.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
<div class="border rounded p-4 shadow-sm bg-light">
|
|
1
|
+
<div class="branded-form-container">
|
|
3
2
|
<!-- 1. Encabezado de Marketing -->
|
|
4
3
|
<div class="text-center mb-4">
|
|
5
4
|
<p class="text-muted widget-intro-text">
|
|
6
|
-
|
|
7
|
-
Regístrate para vivir la experiencia completa de un usuario real que consulta a la plataforma.
|
|
5
|
+
{{ t('ui.login_widget.welcome_message') }}
|
|
8
6
|
</p>
|
|
9
7
|
</div>
|
|
10
8
|
|
|
@@ -13,30 +11,32 @@
|
|
|
13
11
|
action="{{ url_for('login', company_short_name=company_short_name) }}"
|
|
14
12
|
method="post">
|
|
15
13
|
<div class="mb-3">
|
|
16
|
-
<label for="email" class="form-label d-block">
|
|
14
|
+
<label for="email" class="form-label d-block">{{ t('ui.signup.email_label') }}</label>
|
|
17
15
|
<input type="email" id="email" name="email" class="form-control"
|
|
18
16
|
required value="{{ form_data.email if form_data is defined else '' }}">
|
|
19
17
|
</div>
|
|
20
18
|
<div class="mb-3">
|
|
21
|
-
<label for="password" class="form-label d-block">
|
|
19
|
+
<label for="password" class="form-label d-block">{{ t('ui.signup.password_label') }}</label>
|
|
22
20
|
<input type="password" id="password" name="password"
|
|
23
21
|
class="form-control" required>
|
|
24
22
|
</div>
|
|
25
23
|
<button type="submit" class="btn btn-branded-primary w-100 fw-bold py-2">
|
|
26
|
-
|
|
24
|
+
{{ t('ui.login_widget.login_button') }}
|
|
27
25
|
</button>
|
|
28
26
|
</form>
|
|
29
27
|
|
|
30
28
|
<!-- 3. Nueva Sección de Registro más Atractiva -->
|
|
31
29
|
<div class="mt-4 pt-3 text-center" style="border-top: 1px solid #e0e0e0;">
|
|
32
|
-
<span class="text-muted small"
|
|
33
|
-
<a href="{{ url_for('signup', company_short_name=company_short_name) }}" id="signup-link"
|
|
30
|
+
<span class="text-muted small">{{ t('ui.login_widget.no_account_prompt') }}</span>
|
|
31
|
+
<a href="{{ url_for('signup', company_short_name=company_short_name) }}" id="signup-link"
|
|
32
|
+
class="fw-bold ms-1 text-decoration-none" style="color: var(--brand-primary-color);">
|
|
33
|
+
{{ t('ui.login_widget.signup_link') }}</a>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
<!-- 4. Enlace de Recuperación de Contraseña (más sutil) -->
|
|
37
37
|
<div class="text-center mt-2">
|
|
38
38
|
<a href="{{ url_for('forgot_password', company_short_name=company_short_name) }}" class="text-decoration-none text-muted" style="font-size: 0.8rem;">
|
|
39
|
-
|
|
39
|
+
{{ t('ui.login_widget.forgot_password_link') }}
|
|
40
40
|
</a>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
iatoolkit/templates/base.html
CHANGED
|
@@ -4,42 +4,59 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>{% block title %}Chatbot{% endblock %}</title>
|
|
7
|
+
|
|
7
8
|
<!-- Bootstrap 5 CSS -->
|
|
8
|
-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css"
|
|
9
|
-
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css"
|
|
9
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css">
|
|
10
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" >
|
|
10
11
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/filepond/dist/filepond.min.css">
|
|
11
12
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
|
13
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" />
|
|
12
14
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/chat_iatoolkit.css', _external=True) }}">
|
|
13
15
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/onboarding.css', _external=True) }}">
|
|
14
16
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/chat_modal.css', _external=True) }}">
|
|
15
17
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/llm_output.css', _external=True) }}">
|
|
16
|
-
</head>
|
|
17
|
-
<body class="d-flex flex-column p-3" style="min-height: 100vh;">
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
{% block styles %}{% endblock %}
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<!-- El "Ancla": Envolvemos el contenido en un div con un ID y estilo. -->
|
|
23
|
+
<div id="page-content-wrapper" style="position: relative;">
|
|
20
24
|
{% block content %}{% endblock %}
|
|
21
|
-
</
|
|
22
|
-
|
|
25
|
+
</div>
|
|
23
26
|
|
|
24
27
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
|
25
28
|
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
|
26
29
|
<script src="https://cdn.jsdelivr.net/npm/filepond/dist/filepond.min.js"></script>
|
|
27
30
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
28
|
-
|
|
31
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
|
|
29
32
|
|
|
30
33
|
<!-- Mostrar alertas SweetAlert2 si existe el mensaje -->
|
|
31
34
|
<script>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
35
|
+
// Configuración global de Toastr
|
|
36
|
+
toastr.options = {
|
|
37
|
+
"closeButton": true,
|
|
38
|
+
"progressBar": true,
|
|
39
|
+
"positionClass": "toast-bottom-right",
|
|
40
|
+
"preventDuplicates": true,
|
|
41
|
+
"timeOut": "7000",
|
|
42
|
+
"extendedTimeOut": "1000",
|
|
43
|
+
"tapToDismiss": false,
|
|
44
|
+
"target": "#page-content-wrapper"
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
{% if flashed_messages %}
|
|
48
|
+
{% for category, message in flashed_messages %}
|
|
49
|
+
var toastClass = 'toast-info'; // default class
|
|
50
|
+
if ('{{ category }}' === 'error') {
|
|
51
|
+
toastClass = 'toast-error';
|
|
52
|
+
} else if ('{{ category }}' === 'success') {
|
|
53
|
+
toastClass = 'toast-success';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Llama a Toastr usando la opción 'toastClass' para aplicar nuestro estilo
|
|
57
|
+
toastr.info("{{ message }}", null, { "toastClass": "toast " + toastClass });
|
|
58
|
+
|
|
59
|
+
{% endfor %}
|
|
43
60
|
{% endif %}
|
|
44
61
|
</script>
|
|
45
62
|
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
{% extends "base.html" %}
|
|
2
2
|
|
|
3
|
-
{% block title %}
|
|
3
|
+
{% block title %}{{ t('ui.change_password.title') }} - {{ company.name }}{% endblock %}
|
|
4
4
|
|
|
5
|
-
{% block
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
{% block styles %}
|
|
6
|
+
<style>
|
|
7
|
+
{{ branding.css_variables | safe }}
|
|
8
|
+
</style>
|
|
9
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='styles/chat_public.css') }}">
|
|
10
|
+
{% endblock %}
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
{% block content %}
|
|
13
|
+
<div class="container mt-4">
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
{% include '_navbar.html' %}
|
|
15
|
+
{% include '_company_header.html' %}
|
|
14
16
|
|
|
15
|
-
<!--
|
|
17
|
+
<!-- Sección contenedora para centrar el contenido -->
|
|
16
18
|
<section class="hero-section">
|
|
17
19
|
<div class="container">
|
|
18
20
|
<div class="row justify-content-center">
|
|
19
21
|
<div class="col-lg-6 col-md-8">
|
|
20
|
-
<div class="
|
|
21
|
-
<h4 class="form-title
|
|
22
|
-
|
|
22
|
+
<div class="branded-form-container">
|
|
23
|
+
<h4 class="branded-form-title">{{ t('ui.change_password.title') }}</h4>
|
|
23
24
|
<p class="text-muted text-center mb-4">
|
|
24
|
-
|
|
25
|
+
{{ t('ui.change_password.subtitle', email=email) | safe }}
|
|
25
26
|
</p>
|
|
26
27
|
|
|
27
28
|
<form action="{{ url_for('change_password', company_short_name=company_short_name, token=token) }}" method="post">
|
|
28
29
|
|
|
29
|
-
<!-- CAMPO RESTAURADO: Código Temporal -->
|
|
30
30
|
<div class="mb-3">
|
|
31
|
-
<label for="temp_code" class="form-label text-secondary">
|
|
31
|
+
<label for="temp_code" class="form-label text-secondary">{{ t('ui.change_password.temp_code_label') }}</label>
|
|
32
32
|
<input type="text" id="temp_code" name="temp_code" class="form-control"
|
|
33
33
|
required value="{{ form_data.temp_code if form_data else '' }}"
|
|
34
|
-
placeholder="
|
|
34
|
+
placeholder="{{ t('ui.change_password.temp_code_placeholder') }}">
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
37
|
<div class="mb-3">
|
|
38
|
-
<label for="new_password" class="form-label text-secondary">
|
|
38
|
+
<label for="new_password" class="form-label text-secondary">{{ t('ui.change_password.new_password_label') }}</label>
|
|
39
39
|
<input type="password" id="new_password" name="new_password" class="form-control" required>
|
|
40
40
|
<div class="d-flex align-items-start text-muted mt-2" style="font-size: 0.8rem;">
|
|
41
41
|
<i class="bi bi-info-circle me-2" style="font-size: 0.9rem; line-height: 1.4;"></i>
|
|
42
|
-
<span>
|
|
42
|
+
<span>{{ t('ui.change_password.password_instructions') }}</span>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
|
|
46
46
|
<div class="mb-3">
|
|
47
|
-
<label for="confirm_password" class="form-label text-secondary">
|
|
47
|
+
<label for="confirm_password" class="form-label text-secondary">{{ t('ui.change_password.confirm_password_label') }}</label>
|
|
48
48
|
<input type="password" id="confirm_password" name="confirm_password" class="form-control" required>
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
|
-
<button type="submit" class="btn btn-branded-primary w-100 fw-bold py-2 mt-3">
|
|
51
|
+
<button type="submit" class="btn btn-branded-primary w-100 fw-bold py-2 mt-3">{{ t('ui.change_password.save_button') }}</button>
|
|
52
52
|
</form>
|
|
53
53
|
|
|
54
54
|
<div class="text-center mt-4 pt-3" style="border-top: 1px solid #e0e0e0;">
|
|
55
|
-
<a href="{{ url_for('
|
|
56
|
-
<i class="bi bi-arrow-left me-1"></i>
|
|
55
|
+
<a href="{{ url_for('home', company_short_name=company_short_name) }}" class="text-muted text-decoration-none fw-semibold">
|
|
56
|
+
<i class="bi bi-arrow-left me-1"></i>{{ t('ui.change_password.back_to_home') }}
|
|
57
57
|
</a>
|
|
58
58
|
</div>
|
|
59
59
|
</div>
|
|
@@ -61,4 +61,6 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
</section>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
64
66
|
{% endblock %}
|
iatoolkit/templates/chat.html
CHANGED
|
@@ -1,84 +1,101 @@
|
|
|
1
1
|
{% extends "base.html" %}
|
|
2
2
|
|
|
3
|
-
{% block title %}
|
|
3
|
+
{% block title %}{{ branding.name }} IA{% endblock %}
|
|
4
4
|
|
|
5
5
|
{% block content %}
|
|
6
|
-
|
|
6
|
+
<div class="chat-layout-container container">
|
|
7
7
|
{% block styles %}
|
|
8
8
|
{# Movemos los estilos y los links aquí para que se rendericen en el <head> #}
|
|
9
9
|
<style>
|
|
10
10
|
{{ branding.css_variables | safe }}
|
|
11
11
|
</style>
|
|
12
|
-
<link rel="stylesheet" href="{{ url_for('static', filename='styles/onboarding.css', _external=True) }}">
|
|
13
12
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
14
13
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
{% endblock %}
|
|
16
16
|
|
|
17
17
|
<!-- Sección de encabezado con el usuario conectado -->
|
|
18
|
-
<div id="company-section"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<!-- Izquierda: Nombre de la Empresa y atribución "Powered by" -->
|
|
22
|
-
<div class="d-flex align-items-center">
|
|
23
|
-
<span style="{{ branding.primary_text_style }}">
|
|
24
|
-
{{ branding.name }}
|
|
25
|
-
</span>
|
|
26
|
-
<span class="ms-2" data-bs-toggle="tooltip" data-bs-placement="bottom"
|
|
27
|
-
title="Powered by IAToolkit ({{ iatoolkit_version }})">
|
|
28
|
-
<i class="bi bi-info-circle" style="color: {{ branding.header_text_color }}; opacity: 0.7; font-size: 0.9rem;"></i>
|
|
29
|
-
</span>
|
|
30
|
-
</div>
|
|
18
|
+
<div id="company-section"
|
|
19
|
+
class="company-section d-flex flex-column flex-md-row justify-content-md-between align-items-center px-3 py-2"
|
|
20
|
+
style="{{ branding.header_style }}">
|
|
31
21
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<!-- 3. Iconos de Acción -->
|
|
43
|
-
<a href="javascript:void(0);" id="history-button"
|
|
44
|
-
class="action-icon-style" title="Historial con mis consultas" style="color: {{ branding.header_text_color }};">
|
|
45
|
-
<i class="bi bi-clock-history"></i>
|
|
46
|
-
</a>
|
|
47
|
-
<a href="javascript:void(0);"
|
|
48
|
-
id="force-reload-button"
|
|
49
|
-
class="ms-3 action-icon-style"
|
|
50
|
-
title="Forzar Recarga de Contexto"
|
|
51
|
-
style="color: {{ branding.header_text_color }};">
|
|
52
|
-
<i class="bi bi-arrow-clockwise"></i>
|
|
53
|
-
</a>
|
|
54
|
-
<a href="javascript:void(0);" id="send-feedback-button"
|
|
55
|
-
class="ms-3 action-icon-style" title="Tu feedback es muy importante" style="color: {{ branding.header_text_color }};">
|
|
56
|
-
<i class="bi bi-emoji-smile"></i>
|
|
57
|
-
</a>
|
|
58
|
-
<a href="javascript:void(0);" id="onboarding-button"
|
|
59
|
-
class="ms-3 action-icon-style" title="Ver onboarding"
|
|
60
|
-
style="color: {{ branding.header_text_color }};">
|
|
61
|
-
<i class="bi bi-lightbulb"></i>
|
|
62
|
-
</a>
|
|
63
|
-
|
|
64
|
-
<!-- Icono de cerrar sesión (al final) -->
|
|
65
|
-
<a href="{{ url_for('logout', company_short_name=company_short_name, _external=True) }}"
|
|
66
|
-
class="ms-3 action-icon-style" title="Cerrar sesión" style="color: {{ branding.header_text_color }} !important;">
|
|
67
|
-
<i class="bi bi-box-arrow-right"></i>
|
|
68
|
-
</a>
|
|
69
|
-
</div>
|
|
22
|
+
<!-- Fila 1 (Móvil) / Columna Izquierda (Desktop): Nombre de la Empresa -->
|
|
23
|
+
<div class="d-flex align-items-center mb-2 mb-md-0">
|
|
24
|
+
<span style="{{ branding.primary_text_style }}">
|
|
25
|
+
{{ branding.name }}
|
|
26
|
+
</span>
|
|
27
|
+
<span class="ms-2" data-bs-toggle="tooltip" data-bs-placement="bottom"
|
|
28
|
+
title="Powered by IAToolkit ({{ iatoolkit_version }})">
|
|
29
|
+
<i class="bi bi-info-circle" style="color: {{ branding.header_text_color }}; opacity: 0.7; font-size: 0.9rem;"></i>
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
70
32
|
|
|
71
|
-
|
|
33
|
+
<!-- Contenedor para la derecha que agrupa ID de usuario y botones -->
|
|
34
|
+
<div class="d-flex flex-column flex-md-row align-items-center">
|
|
72
35
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
36
|
+
<!-- Fila 2 (Móvil) / Parte 1 de la Columna Derecha (Desktop): ID de Usuario -->
|
|
37
|
+
<span style="{{ branding.secondary_text_style }}" class="mb-2 mb-md-0">
|
|
38
|
+
{{ user_identifier }}
|
|
39
|
+
</span>
|
|
40
|
+
|
|
41
|
+
<!-- Separador Vertical (Solo visible en Desktop) -->
|
|
42
|
+
<div class="vr mx-3 d-none d-md-block"></div>
|
|
43
|
+
|
|
44
|
+
<!-- Fila 3 (Móvil) / Parte 2 de la Columna Derecha (Desktop): Iconos de Acción -->
|
|
45
|
+
<div class="d-flex align-items-center">
|
|
46
|
+
<a href="javascript:void(0);"
|
|
47
|
+
id="history-button"
|
|
48
|
+
class="action-icon-style" title="{{ t('ui.tooltips.history') }}"
|
|
49
|
+
style="color: {{ branding.header_text_color }};">
|
|
50
|
+
<i class="bi bi-clock-history"></i>
|
|
51
|
+
</a>
|
|
52
|
+
<a href="javascript:void(0);"
|
|
53
|
+
id="force-reload-button"
|
|
54
|
+
class="ms-3 action-icon-style"
|
|
55
|
+
title="{{ t('ui.tooltips.reload_context') }}"
|
|
56
|
+
style="color: {{ branding.header_text_color }};">
|
|
57
|
+
<i class="bi bi-arrow-clockwise"></i>
|
|
58
|
+
</a>
|
|
59
|
+
<a href="javascript:void(0);"
|
|
60
|
+
id="send-feedback-button"
|
|
61
|
+
class="ms-3 action-icon-style"
|
|
62
|
+
title="{{ t('ui.tooltips.feedback') }}"
|
|
63
|
+
style="color: {{ branding.header_text_color }};">
|
|
64
|
+
<i class="bi bi-emoji-smile"></i>
|
|
65
|
+
</a>
|
|
66
|
+
|
|
67
|
+
<a href="javascript:void(0);"
|
|
68
|
+
id="onboarding-button"
|
|
69
|
+
class="ms-3 action-icon-style"
|
|
70
|
+
title="{{ t('ui.tooltips.onboarding') }}"
|
|
71
|
+
style="color: {{ branding.header_text_color }};">
|
|
72
|
+
<i class="bi bi-lightbulb"></i>
|
|
73
|
+
</a>
|
|
74
|
+
<a href="javascript:void(0);"
|
|
75
|
+
id="open-help-button"
|
|
76
|
+
class="ms-3 action-icon-style"
|
|
77
|
+
title="{{ t('ui.tooltips.usage_guide') }}"
|
|
78
|
+
style="color: {{ branding.header_text_color }};">
|
|
79
|
+
<i class="bi bi-question-circle-fill"></i>
|
|
80
|
+
</a>
|
|
81
|
+
<a href="javascript:void(0);"
|
|
82
|
+
id="logout-button"
|
|
83
|
+
class="ms-3 action-icon-style"
|
|
84
|
+
title="{{ t('ui.tooltips.logout') }}"
|
|
85
|
+
style="color: {{ branding.header_text_color }}; !important;">
|
|
86
|
+
<i class="bi bi-box-arrow-right"></i>
|
|
87
|
+
</a>
|
|
88
|
+
</div>
|
|
80
89
|
</div>
|
|
81
90
|
</div>
|
|
91
|
+
|
|
92
|
+
<div id="chat-container"
|
|
93
|
+
class="chat-block mt-2 flex-grow-1" style="overflow-y: auto;">
|
|
94
|
+
|
|
95
|
+
<!-- Mensaje de bienvenida -->
|
|
96
|
+
<div class="answer-section">
|
|
97
|
+
{{ t('ui.chat.welcome_message') }}
|
|
98
|
+
</div>
|
|
82
99
|
</div>
|
|
83
100
|
|
|
84
101
|
<!-- Input oculto de FilePond -->
|
|
@@ -96,8 +113,11 @@
|
|
|
96
113
|
<div class="{{ prompt_col_class }}">
|
|
97
114
|
<div class="position-relative h-100">
|
|
98
115
|
<div class="input-group dropup h-100">
|
|
99
|
-
<button type="button" id="prompt-select-button"
|
|
100
|
-
|
|
116
|
+
<button type="button" id="prompt-select-button"
|
|
117
|
+
class="btn prompt-select-button border dropdown-toggle w-100 text-start"
|
|
118
|
+
data-bs-toggle="dropdown"
|
|
119
|
+
aria-expanded="false">
|
|
120
|
+
{{ t('ui.chat.prompts_available') }} ....
|
|
101
121
|
</button>
|
|
102
122
|
<ul class="dropdown-menu dropdown-menu-soft w-100">
|
|
103
123
|
{% if prompts and prompts.message %}
|
|
@@ -120,7 +140,11 @@
|
|
|
120
140
|
{% endif %}
|
|
121
141
|
</ul>
|
|
122
142
|
</div>
|
|
123
|
-
<button type="button"
|
|
143
|
+
<button type="button"
|
|
144
|
+
id="clear-selection-button"
|
|
145
|
+
class="btn clear-specific-data-button position-absolute end-0 me-1" style="display: none;">
|
|
146
|
+
<i class="bi bi-x-circle-fill"></i>
|
|
147
|
+
</button>
|
|
124
148
|
</div>
|
|
125
149
|
<input type="hidden" id="prompt-select-value" name="prompt_select_value">
|
|
126
150
|
<input type="hidden" id="prompt-select-description" name="prompt-select-description">
|
|
@@ -139,33 +163,39 @@
|
|
|
139
163
|
<div class="d-flex align-items-center">
|
|
140
164
|
<!-- varita magica -->
|
|
141
165
|
<a class="p-2" href="#prompt-assistant-collapse" data-bs-toggle="collapse" role="button"
|
|
142
|
-
aria-expanded="false" aria-controls="prompt-assistant-collapse"
|
|
166
|
+
aria-expanded="false" aria-controls="prompt-assistant-collapse"
|
|
167
|
+
title="{{ t('ui.tooltips.use_prompt_assistant') }}">
|
|
143
168
|
<i class="bi bi-magic"></i>
|
|
144
169
|
</a>
|
|
145
|
-
<a class="p-2" href="javascript:void(0);" id="paperclip-button"
|
|
170
|
+
<a class="p-2" href="javascript:void(0);" id="paperclip-button"
|
|
171
|
+
title="{{ t('ui.tooltips.attach_files') }}">
|
|
146
172
|
<i class="bi bi-plus-circle"></i>
|
|
147
173
|
</a>
|
|
148
174
|
<div id="view-files-button-container" style="display: none;">
|
|
149
|
-
<a class="p-2" href="javascript:void(0);" id="view-files-button"
|
|
175
|
+
<a class="p-2" href="javascript:void(0);" id="view-files-button"
|
|
176
|
+
title="{{ t('ui.tooltips.view_attached_files') }}">
|
|
150
177
|
<i class="bi bi-file-earmark-text"></i>
|
|
151
178
|
</a>
|
|
152
179
|
</div>
|
|
153
180
|
</div>
|
|
154
181
|
|
|
155
182
|
<!-- Textarea Central -->
|
|
156
|
-
<textarea id="question" placeholder="
|
|
183
|
+
<textarea id="question" placeholder="{{ t('ui.chat.input_placeholder') }}"
|
|
184
|
+
class="form-control chat-textarea" style="resize: none;" rows="1"></textarea>
|
|
157
185
|
|
|
158
186
|
<!-- Botón de Enviar a la derecha -->
|
|
159
187
|
<div class="d-flex align-items-center">
|
|
160
188
|
<div id="send-button-container">
|
|
161
189
|
<a href="javascript:void(0);" id="send-button"
|
|
162
|
-
class="p-2 send-button-icon"
|
|
190
|
+
class="p-2 send-button-icon"
|
|
191
|
+
title="{{ t('ui.buttons.send') }}">
|
|
163
192
|
<i class="bi bi-arrow-up-circle-fill"></i>
|
|
164
193
|
</a>
|
|
165
194
|
</div>
|
|
166
195
|
<div id="stop-button-container" style="display: none;">
|
|
167
196
|
<a href="javascript:void(0);" id="stop-button"
|
|
168
|
-
class="p-2 text-danger"
|
|
197
|
+
class="p-2 text-danger"
|
|
198
|
+
title="{{ t('ui.buttons.stop') }}">
|
|
169
199
|
<i class="bi bi-stop-circle-fill"></i>
|
|
170
200
|
</a>
|
|
171
201
|
</div>
|
|
@@ -176,6 +206,7 @@
|
|
|
176
206
|
<!-- Incluir los modales desde un archivo externo -->
|
|
177
207
|
{% include 'chat_modals.html' %}
|
|
178
208
|
|
|
209
|
+
</div>
|
|
179
210
|
{% endblock %}
|
|
180
211
|
|
|
181
212
|
{% block scripts %}
|
|
@@ -189,32 +220,29 @@
|
|
|
189
220
|
window.onboardingCards = {{ onboarding_cards | tojson }};
|
|
190
221
|
window.sendButtonColor = "{{ branding.send_button_color }}";
|
|
191
222
|
|
|
223
|
+
// JS translations helper
|
|
224
|
+
window.i18n = {{ js_translations | tojson }};
|
|
225
|
+
function t_js(key) {
|
|
226
|
+
return window.i18n[key] || key;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
192
230
|
</script>
|
|
193
231
|
|
|
194
232
|
<!-- Carga de los scripts JS externos después de definir las variables globales -->
|
|
195
|
-
<script src="{{ url_for('static', filename='js/
|
|
196
|
-
<script src="{{ url_for('static', filename='js/
|
|
197
|
-
<script src="{{ url_for('static', filename='js/
|
|
198
|
-
<script src="{{ url_for('static', filename='js/
|
|
199
|
-
<script src="{{ url_for('static', filename='js/
|
|
233
|
+
<script src="{{ url_for('static', filename='js/chat_history_button.js', _external=True) }}"></script>
|
|
234
|
+
<script src="{{ url_for('static', filename='js/chat_reload_button.js', _external=True) }}"></script>
|
|
235
|
+
<script src="{{ url_for('static', filename='js/chat_feedback_button.js', _external=True) }}"></script>
|
|
236
|
+
<script src="{{ url_for('static', filename='js/chat_help_content.js', _external=True) }}"></script>
|
|
237
|
+
<script src="{{ url_for('static', filename='js/chat_onboarding_button.js', _external=True) }}"></script>
|
|
238
|
+
<script src="{{ url_for('static', filename='js/chat_logout_button.js', _external=True) }}"></script>
|
|
239
|
+
<script src="{{ url_for('static', filename='js/chat_prompt_manager.js', _external=True) }}"></script>
|
|
240
|
+
<script src="{{ url_for('static', filename='js/chat_filepond.js', _external=True) }}"></script>
|
|
241
|
+
<script src="{{ url_for('static', filename='js/chat_main.js', _external=True) }}"></script>
|
|
200
242
|
|
|
201
|
-
<
|
|
202
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
203
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
|
|
243
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
204
244
|
|
|
205
|
-
<script>
|
|
206
|
-
document.addEventListener('DOMContentLoaded', function () {
|
|
207
|
-
const promptCollapse = document.getElementById('prompt-assistant-collapse');
|
|
208
|
-
if (promptCollapse) {
|
|
209
|
-
promptCollapse.addEventListener('shown.bs.collapse', function () {
|
|
210
|
-
// Desplazar la ventana al final de la página para mantener visible el área de entrada.
|
|
211
|
-
window.scrollTo({
|
|
212
|
-
top: document.body.scrollHeight,
|
|
213
|
-
behavior: 'smooth'
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
});
|
|
245
|
+
<script>
|
|
218
246
|
|
|
219
247
|
document.addEventListener('DOMContentLoaded', function () {
|
|
220
248
|
// Inicializar todos los tooltips de la página
|