refactor: renamed instructions to context

This commit is contained in:
Per Stark
2025-05-09 16:00:52 +02:00
parent 463c562ba7
commit 6ed49f7155
22 changed files with 111 additions and 123 deletions

View File

@@ -1,8 +1,4 @@
{% extends "body_base.html" %}
{% block main %}
{% if user %}
{% include 'index/signed_in/base.html' %}
{% else %}
{% include 'auth/signin_form.html' %}
{% endif %}
{% endblock %}

View File

@@ -1,7 +1,12 @@
<div class="flex grow mt-2 sm:mt-4">
<div class="flex justify-center grow mt-2 sm:mt-4">
<div class="container">
{% include 'index/signed_in/searchbar.html' %}
<div>
<h2 class="font-extrabold">Recent content</h2>
{% include "content/content_list.html" %}
</div>
<div class="grid grid-cols-1 md:grid-cols-2 shadow my-10">
{% include "index/signed_in/active_jobs.html" %}

View File

@@ -7,18 +7,17 @@ enctype="multipart/form-data"
<h3 class="text-lg font-bold">Add new content</h3>
<div class="form-control">
<label class="floating-label">
<span>Instructions</span>
<textarea name="instructions" class="textarea w-full validator"
placeholder="Enter instructions for the AI here, help it understand what its seeing or how it should relate to the database"
required>{{ instructions }}</textarea>
<div class="validator-hint hidden">Instructions are required</div>
<span>Content</span>
<textarea name="content" class="textarea input-bordered w-full"
placeholder="Enter the content you want to ingest, it can be an URL or a text snippet">{{ content }}</textarea>
</label>
</div>
<div class="form-control">
<label class="floating-label">
<span>Content</span>
<textarea name="content" class="textarea input-bordered w-full"
placeholder="Enter the content you want to ingress, it can be an URL or a text snippet">{{ content }}</textarea>
<span>Context</span>
<textarea name="context" class="textarea w-full"
placeholder="Enter context for the AI here, help it understand what its seeing or how it should relate to the database">{{
context }}</textarea>
</label>
</div>
<div class="form-control">

View File

@@ -1,7 +1,7 @@
{% block latest_content_section %}
<ul id="latest_content_section" class="list">
<li class="py-4 text-center font-bold tracking-wide">Recently added content</li>
{% for item in latest_text_contents %}
{% for item in text_contents %}
<li class="list-row">
<div class="bg-accent rounded-box size-10 flex justify-center items-center text-accent-content">
{% if item.url_info %}
@@ -27,8 +27,8 @@
<span class="badge badge-xs badge-accent ml-1">{{item.category}}</span>
</div>
</div>
<p class="list-col-wrap text-xs [&:before]:content-['Instructions:_'] [&:before]:opacity-60">
{{item.instructions}}
<p class="list-col-wrap text-xs [&:before]:content-['Context:_'] [&:before]:opacity-60">
{{item.context}}
</p>
<button class="btn btn-disabled btn-square btn-ghost btn-sm">
{% include "icons/edit_icon.html" %}