plain-rails 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -9
  3. data/app/assets/builds/plain.css +1 -1
  4. data/app/assets/stylesheets/plain/application.tailwind.css +34 -1
  5. data/app/controllers/plain/conversations_controller.rb +8 -4
  6. data/app/controllers/plain/docs_controller.rb +51 -16
  7. data/app/controllers/plain/documents_controller.rb +28 -0
  8. data/app/controllers/plain/home_controller.rb +2 -2
  9. data/app/helpers/plain/documents_helper.rb +4 -0
  10. data/app/models/plain/document.rb +49 -0
  11. data/app/services/plain/ai_docs.rb +10 -9
  12. data/app/services/plain/docs_service.rb +21 -3
  13. data/app/views/layouts/plain/application.html.erb +133 -49
  14. data/app/views/plain/conversations/_conversation_item.html.erb +22 -15
  15. data/app/views/plain/conversations/_conversation_list.html.erb +1 -1
  16. data/app/views/plain/conversations/_modal.html.erb +9 -8
  17. data/app/views/plain/conversations/_status.erb +9 -0
  18. data/app/views/plain/conversations/destroy.turbo_stream.erb +1 -0
  19. data/app/views/plain/conversations/index.html.erb +9 -5
  20. data/app/views/plain/conversations/pin.turbo_stream.erb +3 -0
  21. data/app/views/plain/conversations/show.html.erb +3 -1
  22. data/app/views/plain/docs/_form.html.erb +41 -0
  23. data/app/views/plain/docs/_menu.erb +1 -5
  24. data/app/views/plain/docs/_sections.erb +1 -1
  25. data/app/views/plain/docs/edit.html.erb +3 -0
  26. data/app/views/plain/docs/show.html.erb +28 -9
  27. data/app/views/plain/docs/update.turbo_stream.erb +3 -0
  28. data/app/views/plain/documents/_form.erb +47 -0
  29. data/app/views/plain/documents/create.turbo_stream.erb +15 -0
  30. data/app/views/plain/documents/new.html.erb +3 -0
  31. data/app/views/plain/home/index.html.erb +8 -25
  32. data/app/views/plain/messages/_form.html.erb +7 -3
  33. data/app/views/plain/messages/_message_item.html.erb +35 -13
  34. data/app/views/plain/shared/_powered_by.erb +10 -0
  35. data/config/routes.rb +9 -1
  36. data/lib/plain/configuration.rb +2 -1
  37. data/lib/plain/engine.rb +1 -1
  38. data/lib/plain/version.rb +1 -1
  39. data/lib/tasks/plain_tasks.rake +40 -0
  40. metadata +19 -21
  41. data/app/views/plain/conversations/_conversation_item.erb +0 -15
@@ -0,0 +1,47 @@
1
+ <div class="my-2 col-span-1 divide-y divide-gray-200 dark:divide-gray-900 rounded-lg bg-gray-100 border dark:bg-zinc-900 shadow">
2
+
3
+
4
+ <div class="flex w-full items-center justify-between space-x-6 p-6">
5
+ <!--<div class="flex-1 truncate">
6
+ <div class="flex items-center space-x-3">
7
+ <h3 class="truncate text-sm font-medium text-gray-900">Jane Cooper</h3>
8
+ <span class="inline-flex flex-shrink-0 items-center rounded-full bg-green-50 px-1.5 py-0.5 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">Admin</span>
9
+ </div>
10
+ <p class="mt-1 truncate text-sm text-gray-500">Regional Paradigm Technician</p>
11
+ </div>
12
+ <img class="h-10 w-10 flex-shrink-0 rounded-full bg-gray-300" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=facearea&amp;facepad=4&amp;w=256&amp;h=256&amp;q=60" alt="">
13
+ -->
14
+
15
+ <%= form_for document, url: conversation_message_documents_path(message.conversation, message) do |f| %>
16
+
17
+
18
+ <% if document.errors.any? %>
19
+ <div class="sm:col-span-3">
20
+ <div class="bg-red-600 text-white p-2 rounded-md text-xs">
21
+ <%= document.errors.full_messages.join("\n") %>
22
+ </div>
23
+ </div>
24
+ <% end %>
25
+
26
+ <div class="sm:col-span-3">
27
+ <%= f.label :title, class: "block text-sm font-medium leading-6 text-gray-900 dark:text-gray-100" %>
28
+ <div class="mt-2">
29
+ <%= f.text_field :title, class: "bg-white dark:bg-transparent block w-full rounded-md border-0 py-1.5 text-gray-900 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %>
30
+ </div>
31
+ </div>
32
+
33
+ <div class="sm:col-span-4">
34
+ <%= f.label :path, class: "block text-sm font-medium leading-6 text-gray-900 dark:text-gray-100" %>
35
+ <div class="mt-2">
36
+ <div class="flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600 sm:max-w-md">
37
+ <span class="flex select-none items-center pl-3 text-gray-500 sm:text-sm">/docs/</span>
38
+ <%= f.text_field :path, class: "block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 dark:text-gray-100 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6", placeholder: "janesmith" %>
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ <%= f.submit class: "btn-dark my-2" %>
44
+ <% end %>
45
+
46
+ </div>
47
+ </div>
@@ -0,0 +1,15 @@
1
+ <%= turbo_stream.update "action-form-#{@message.id}" do %>
2
+ <% if @document.errors.any? %>
3
+ <%= render "form", document: @document, message: @message %>
4
+ <% else %>
5
+ <div class="sm:col-span-3 my-2">
6
+ <div class="bg-green-600 text-white p-2 rounded-md text-xs">
7
+ Document successfully created
8
+ </div>
9
+ </div>
10
+ <% end %>
11
+ <% end %>
12
+
13
+ <%= turbo_stream.update "docs-menu" do %>
14
+ <%= render partial: 'plain/docs/menu', locals: { nodes: @docs_structure[:children], level: 1 } %>
15
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= turbo_frame_tag "action-form-#{@message.id}" do %>
2
+ <%= render "form", document: @document, message: @message %>
3
+ <% end %>
@@ -1,35 +1,18 @@
1
1
  <%= turbo_frame_tag "plain" do %>
2
2
  <%= render "plain/conversations/modal" do %>
3
- <div class="border shadow-sm rounded-md bg-white m-4">
4
- <h2 class=" p-4 inline-block text-2xl sm:text-3xl font-extrabold text-slate-900 tracking-tight dark:text-slate-200">
3
+ <div class="border dark:border-zinc-900 shadow-sm rounded-md bg-white dark:bg-zinc-800 m-4">
4
+ <h2 class=" p-4 inline-block text-md sm:text-lg font-extrabold text-zinc-900 tracking-tight dark:text-zinc-200">
5
5
  Continue conversations
6
6
  </h2>
7
7
 
8
- <div class="divide divide-y">
9
- <% @conversations.each do |c| %>
10
- <div class="p-2 rounded-sm hover:bg-black/5">
11
-
12
- <div class="flex space-x-2">
13
- <% if c.pinned? %>
14
- <div class="w-5 h-5">
15
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
16
- <path stroke-linecap="round" stroke-linejoin="round" d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z" />
17
- </svg>
18
- </div>
19
- <% end %>
20
- <%= link_to c.subject || "new chat", conversation_path(c), data: {"turbo-frame": "plain"} %>
21
- </div>
22
- <p class="text-xs">
23
- <%= time_ago_in_words(c.created_at) %>
24
- </p>
25
- </div>
26
- <% end %>
8
+ <div class="grid grid-cols-1 divide-y dark:divide-zinc-700 max-h-[57vh] overflow-auto">
9
+ <%= render partial: "plain/conversations/conversation_item", collection: @conversations, as: :conversation %>
27
10
  </div>
28
- <div class="m-2 flex justify-between">
29
- <%= link_to "New conversation", new_conversation_path, class: "rounded-md bg-brand-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600" %>
30
- <%= link_to "See previous chats", conversations_path, class: "rounded-lg text-slate-900 font-semibold transition flex items-center gap-3 text-[0.8125rem] leading-6 py-1 px-1.5 hover:bg-slate-900/[0.03] -my-1 -mx-1.5" %>
31
-
11
+ <div class="flex justify-between px-3 py-2 text-xs font-medium border-t dark:border-zinc-700 rounded-b-lg bg-zinc-100/75 dark:bg-zinc-900/75">
12
+ <%= link_to "New conversation", new_conversation_path, class: "btn-dark" %>
13
+ <%= link_to "See previous chats", conversations_path, class: "link" %>
32
14
  </div>
33
15
  </div>
16
+ <%= render "plain/shared/powered_by" %>
34
17
  <% end %>
35
18
  <% end %>
@@ -8,15 +8,19 @@
8
8
  action: "turbo:submit-start->loader#formSubmitting turbo:submit-end->loader#formSubmitted"
9
9
  }
10
10
  } do |form| %>
11
- <div class="absolute bottom-0 border-t pt-2 bg-white h-[52px]">
11
+ <div class="absolute bottom-0 border-t dark:border-zinc-900 pt-2 bg-white h-[52px]
12
+ bg-white/70 dark:bg-black/90 backdrop-blur dark:shadow-zinc-900 shadow-[0_-1px_rgba(229,231,235,.53),0_5px_20px_-5px_rgba(0,0,0,.24)]
13
+ ">
12
14
  <div class="flex space-x-2 w-[448px] px-2">
13
15
  <%= form.text_field :content,
14
16
  label: false,
15
- class: "flex-grow p-2 block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6"
17
+ placeholder: "Write your prompt",
18
+ class: "w-full rounded-md flex-1 sm:text-sm text-base bg-zinc-200/50 dark:bg-zinc-800/30 border border-zinc-200/50 dark:border-zinc-600 resize-none scroll-m-2 h-[36px] transition-colors focus:border-zinc-400 focus:ring-0 focus:outline-none"
16
19
  %>
17
20
 
18
21
  <div class="">
19
- <%= form.submit "Ask Plain", "data-loader-target": "loader", class: "ml-4 inline-flex justify-center rounded-md bg-brand-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600" %>
22
+ <%= form.submit "Ask Plain", "data-loader-target": "loader",
23
+ class: "btn-dark" %>
20
24
  </div>
21
25
 
22
26
  </div>
@@ -1,23 +1,45 @@
1
1
  <div id="message-item-<%= message.id %>"
2
- class="message-role <%= message.assistant? ? "bg-white" : "bg-brand-200" %>
3
- mx-4 flex flex-col pb-1 p-2 my-1 shadow-sm rounded-md border border-black/10">
2
+ <% if message.assistant? %>
3
+ data-controller="markdoc"
4
+ <% end %>
5
+ data-markdoc-content-value="<%= message.content %>"
6
+ class="message-role <%= message.assistant? ? "bg-white dark:bg-zinc-800" : "bg-brand-200 dark:bg-brand-600" %>
7
+ mx-4 flex flex-col p-2 my-1 shadow-sm rounded-md border border-black/10 dark:border-black/90">
4
8
 
5
- <%= "Plain bot:" if message.assistant? %>
6
9
 
7
- <div class="prose prose-sm space-y-2">
8
- <% unless message.content.nil? %>
9
- <%= raw Plain::AiDocs.convert_markdown message.content %>
10
- <% end %>
10
+ <% if message.assistant? %>
11
+ <div class="flex items-center space-x-2">
12
+ <div class="group flex items-center h-8 rounded-full
13
+ text-sm font-semibold whitespace-nowrap px-3
14
+ focus:outline-none focus:ring-2
15
+ bg-green-50 text-green-600
16
+ dark:bg-green-600 dark:text-green-50">
17
+ <div class="flex space-x-2 font-semibold text-zinc-900 dark:text-white">
18
+ <svg class="h-5 w-5 block" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" width="15" height="15"><path d="M7.5 2.5a5 5 0 015 5v6a1 1 0 01-1 1h-8a1 1 0 01-1-1v-6a5 5 0 015-5zm0 0V0M4 11.5h7M.5 8v4m14-4v4m-9-2.5a1 1 0 110-2 1 1 0 010 2zm4 0a1 1 0 110-2 1 1 0 010 2z" stroke="currentColor"></path></svg>
19
+ <span><%= "Plain bot" %></span>
20
+ </div>
21
+ </div>
22
+
23
+ <span class="text-xs text-gray-500">
24
+ <%= l(message.created_at, format: :short) %>
25
+ </span>
26
+ </div>
27
+ <% end %>
28
+
29
+ <div class="prose prose-sm dark:prose-invert space-y-2"
30
+ data-markdoc-target="container">
31
+ <%= raw message.content %>
11
32
  </div>
12
33
 
34
+ <%= turbo_frame_tag "action-form-#{message.id}" do %>
35
+
36
+ <% end %>
37
+
13
38
  <div class="flex space-x-2">
14
39
  <% if message.assistant? %>
15
- <button class="rounded bg-white px-2 py-1 text-xs font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
16
- create doc
17
- </button>
18
- <button class="rounded bg-white px-2 py-1 text-xs font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
19
- OTHER action?
20
- </button>
40
+ <%= link_to "Convert to doc",
41
+ plain.new_conversation_message_document_path(message.conversation, message),
42
+ class: "btn", "data-turbo-frame": "action-form-#{message.id}" %>
21
43
  <% end %>
22
44
  </div>
23
45
  <% if local_assigns[:scroll] %>
@@ -0,0 +1,10 @@
1
+ <div class="flex justify-center">
2
+ <a class="rounded-lg text-zinc-900 dark:text-zinc-100 font-semibold transition flex items-center gap-3 text-[0.8125rem] leading-6 py-1 px-1.5 hover:bg-zinc-900/[0.03] -my-1 -mx-1.5"
3
+ href="https://github.com/chaskiq/plain" target="blank">
4
+ <svg viewBox="0 0 24 24" aria-hidden="true" class="h-6 w-6 fill-zinc-900 dark:fill-zinc-100">
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.463 2 11.97c0 4.404 2.865 8.14 6.839 9.458.5.092.682-.216.682-.48 0-.236-.008-.864-.013-1.695-2.782.602-3.369-1.337-3.369-1.337-.454-1.151-1.11-1.458-1.11-1.458-.908-.618.069-.606.069-.606 1.003.07 1.531 1.027 1.531 1.027.892 1.524 2.341 1.084 2.91.828.092-.643.35-1.083.636-1.332-2.22-.251-4.555-1.107-4.555-4.927 0-1.088.39-1.979 1.029-2.675-.103-.252-.446-1.266.098-2.638 0 0 .84-.268 2.75 1.022A9.607 9.607 0 0 1 12 6.82c.85.004 1.705.114 2.504.336 1.909-1.29 2.747-1.022 2.747-1.022.546 1.372.202 2.386.1 2.638.64.696 1.028 1.587 1.028 2.675 0 3.83-2.339 4.673-4.566 4.92.359.307.678.915.678 1.846 0 1.332-.012 2.407-.012 2.734 0 .267.18.577.688.48 3.97-1.32 6.833-5.054 6.833-9.458C22 6.463 17.522 2 12 2Z">
6
+ </path>
7
+ </svg>
8
+ Powered by plain project
9
+ </a>
10
+ </div>
data/config/routes.rb CHANGED
@@ -3,9 +3,17 @@ Plain::Engine.routes.draw do
3
3
  root 'home#index'
4
4
 
5
5
  resources :conversations do
6
- resources :messages
6
+ member do
7
+ put :pin
8
+ end
9
+ resources :messages do
10
+ resources :documents
11
+ end
7
12
  end
8
13
 
9
14
  get '/docs/*file_path', to: 'docs#show', as: :docs
10
15
  get '/docs/', to: 'docs#show'
16
+ get '/doc_editor/*file_path', to: 'docs#edit', as: :edit_doc
17
+ put '/doc_editor/*file_path', to: 'docs#update', as: :update_doc
18
+
11
19
  end
@@ -1,6 +1,7 @@
1
1
  module Plain
2
2
  class Configuration
3
- attr_accessor :paths, :chat_environments, :vector_search, :extensions
3
+ attr_accessor :paths, :chat_environments,
4
+ :vector_search, :extensions
4
5
 
5
6
  def initialize
6
7
  @paths = []
data/lib/plain/engine.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "openai"
2
2
  require "qdrant"
3
3
  require "langchainrb"
4
- require "coderay"
4
+ # require "coderay"
5
5
  require "redcarpet"
6
6
 
7
7
  module Plain
data/lib/plain/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plain
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -7,6 +7,7 @@ namespace :plain do
7
7
  end
8
8
 
9
9
 
10
+ desc "Build the tailwind css"
10
11
  task :tailwind_engine_watch do
11
12
  require "tailwindcss-rails"
12
13
  # NOTE: tailwindcss-rails is an engine
@@ -18,4 +19,43 @@ namespace :plain do
18
19
  --minify -w"
19
20
  end
20
21
  end
22
+
23
+ namespace :site do
24
+ desc "Compile site"
25
+ task compile: :environment do
26
+ require 'rack/static'
27
+ require 'fileutils'
28
+
29
+ # Ensure public/docs directory exists
30
+ FileUtils.mkdir_p(Rails.root.join('public', 'docs'))
31
+
32
+ # Get the structure from the DocsService class
33
+ structure = Plain::DocsService.get_structure
34
+
35
+ # Get all files from the structure
36
+ files = Plain::DocsService.get_all_files(structure)
37
+
38
+ # Generate the proper paths and compile the files
39
+ files.each do |file|
40
+ path = file[:path]
41
+ content = Plain::DocsService.get_content(path)
42
+
43
+ # Create necessary directories
44
+ FileUtils.mkdir_p(File.dirname(Rails.root.join('public', 'static-plain/docs', "#{path}.html")))
45
+
46
+ response = Rails.application.call( 'PATH_INFO' => "/plain/docs/#{path}",'HTTP_HOST' => 'localhost', 'HTTP_PORT' => "3000",'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => 'static=true', 'rack.input' => StringIO.new)
47
+
48
+ if response.first == 200
49
+ html = response[2].first
50
+
51
+ html.gsub!(/href="\/plain\/docs\/([^"]*)"/, 'href="/static-plain/docs/\1.html"')
52
+
53
+ # Save compiled file to public/docs directory
54
+ File.open(Rails.root.join('public', 'static-plain/docs', "#{path}.html"), 'w') do |f|
55
+ f.write(html)
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
21
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plain-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Michelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.6.12
33
+ version: 0.6.13
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.6.12
40
+ version: 0.6.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-openai
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.9.2
69
- - !ruby/object:Gem::Dependency
70
- name: coderay
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.1'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.1'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: redcarpet
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +94,7 @@ dependencies:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
96
  version: 1.0.1
111
- description: Plain is an ai and documentation system for rails apps.
97
+ description: Plain is an AI and documentation system for rails apps.
112
98
  email:
113
99
  - miguelmichelson@gmail.com
114
100
  executables: []
@@ -124,11 +110,13 @@ files:
124
110
  - app/controllers/plain/application_controller.rb
125
111
  - app/controllers/plain/conversations_controller.rb
126
112
  - app/controllers/plain/docs_controller.rb
113
+ - app/controllers/plain/documents_controller.rb
127
114
  - app/controllers/plain/home_controller.rb
128
115
  - app/controllers/plain/messages_controller.rb
129
116
  - app/helpers/plain/application_helper.rb
130
117
  - app/helpers/plain/conversations_helper.rb
131
118
  - app/helpers/plain/docs_helper.rb
119
+ - app/helpers/plain/documents_helper.rb
132
120
  - app/helpers/plain/home_helper.rb
133
121
  - app/helpers/plain/messages_helper.rb
134
122
  - app/javascripts/loader_controller.js
@@ -139,21 +127,30 @@ files:
139
127
  - app/mailers/plain/application_mailer.rb
140
128
  - app/models/plain/application_record.rb
141
129
  - app/models/plain/conversation.rb
130
+ - app/models/plain/document.rb
142
131
  - app/models/plain/message.rb
143
132
  - app/services/plain/ai_docs.rb
144
133
  - app/services/plain/docs_service.rb
145
134
  - app/views/layouts/plain/application.html.erb
146
- - app/views/plain/conversations/_conversation_item.erb
147
135
  - app/views/plain/conversations/_conversation_item.html.erb
148
136
  - app/views/plain/conversations/_conversation_list.erb
149
137
  - app/views/plain/conversations/_conversation_list.html.erb
150
138
  - app/views/plain/conversations/_modal.html.erb
139
+ - app/views/plain/conversations/_status.erb
140
+ - app/views/plain/conversations/destroy.turbo_stream.erb
151
141
  - app/views/plain/conversations/index.html.erb
142
+ - app/views/plain/conversations/pin.turbo_stream.erb
152
143
  - app/views/plain/conversations/show.html.erb
153
144
  - app/views/plain/docs/_footer.erb
145
+ - app/views/plain/docs/_form.html.erb
154
146
  - app/views/plain/docs/_menu.erb
155
147
  - app/views/plain/docs/_sections.erb
148
+ - app/views/plain/docs/edit.html.erb
156
149
  - app/views/plain/docs/show.html.erb
150
+ - app/views/plain/docs/update.turbo_stream.erb
151
+ - app/views/plain/documents/_form.erb
152
+ - app/views/plain/documents/create.turbo_stream.erb
153
+ - app/views/plain/documents/new.html.erb
157
154
  - app/views/plain/home/index.html.erb
158
155
  - app/views/plain/messages/_form.html.erb
159
156
  - app/views/plain/messages/_message_item.html.erb
@@ -161,6 +158,7 @@ files:
161
158
  - app/views/plain/messages/_new_message.turbo_stream.erb
162
159
  - app/views/plain/messages/create.turbo_stream.erb
163
160
  - app/views/plain/messages/index.html.erb
161
+ - app/views/plain/shared/_powered_by.erb
164
162
  - config/database.yml
165
163
  - config/routes.rb
166
164
  - db/migrate/20230729010703_create_plain_conversations.rb
@@ -193,5 +191,5 @@ requirements: []
193
191
  rubygems_version: 3.2.3
194
192
  signing_key:
195
193
  specification_version: 4
196
- summary: Plain is an ai and documentation system for rails apps.
194
+ summary: Plain is an AI and documentation system for rails apps.
197
195
  test_files: []
@@ -1,15 +0,0 @@
1
- <div class="p-2 rounded-sm hover:bg-black/5">
2
- <p class="flex space-x-2">
3
- <% if conversation.pinned? %>
4
- <div class="w-5 h-5">
5
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
6
- <path stroke-linecap="round" stroke-linejoin="round" d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z" />
7
- </svg>
8
- <% end %>
9
- </div>
10
- <%= link_to conversation.subject || "new chat", conversation_path(conversation), data: {"turbo-frame": "plain"} %>
11
- </p>
12
- <p class="text-xs">
13
- <%= time_ago_in_words(conversation.created_at) %>
14
- </p>
15
- </div>