Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Branch #3775

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1876872
WIP for initial page
nidaqg Oct 7, 2024
43e127b
WIP with ReactSAcaffolding
nidaqg Oct 8, 2024
3f7a0a2
db create worked
markdoeswork Oct 8, 2024
4d6bdf8
Adding ChatGPT Api call (#3777)
carloslimasd Oct 8, 2024
132e4e4
add applicaiton record
markdoeswork Oct 8, 2024
e431650
Separate page for response
nidaqg Oct 8, 2024
243b1ab
Merge branch 'add_db_to_webstie' into bootstrap-ai
markdoeswork Oct 8, 2024
8545787
Updating Secrets & Git Ignore (#3776) (#3780)
carloslimasd Oct 8, 2024
7c303ed
Adding PB kits trainning to ChatGPT
carloslimasd Oct 8, 2024
c59fda0
Getting api key from environment
carloslimasd Oct 8, 2024
61a5bf9
react-live hookedup
nickamantia Oct 8, 2024
aa43bec
live previewer with response
nidaqg Oct 8, 2024
4ceb66c
Live previewer with kits
nidaqg Oct 8, 2024
07d285b
Changing the way we are getting the kit code
carloslimasd Oct 8, 2024
ec211b1
Merge remote-tracking branch 'origin' into bootstrap-ai
carloslimasd Oct 8, 2024
a77e62a
Merge branch 'bootstrap-ai' of github.com:powerhome/playbook into boo…
carloslimasd Oct 8, 2024
cf7d657
Getting kits raw text
carloslimasd Oct 8, 2024
f85bc59
uses axios to post to project table
markdoeswork Oct 8, 2024
05181b3
fix react bs
markdoeswork Oct 8, 2024
0a234dc
add nav
markdoeswork Oct 8, 2024
5d8ae04
Add nav links and save initial message
kangaree Oct 8, 2024
76497df
Adding all the PB kits to train chatgpt
carloslimasd Oct 8, 2024
9ef0d7c
Preview only
nidaqg Oct 8, 2024
2ffe4e5
Load messages based on project. Change from nav and query param
kangaree Oct 8, 2024
3c8a01d
Fixed Rubocop
jasperfurniss Oct 9, 2024
cd8c21b
Latest UI
jasperfurniss Oct 9, 2024
56fce2c
Fixing rubocop
carloslimasd Oct 9, 2024
40dbd6d
Add messages
kangaree Oct 9, 2024
cb0f936
Trainning chatgpt to use all kits from playbook
carloslimasd Oct 9, 2024
6566f65
Merge remote-tracking branch 'origin' into bootstrap-ai
carloslimasd Oct 9, 2024
0e3806d
Merge branch 'bootstrap-ai' of github.com:powerhome/playbook into boo…
carloslimasd Oct 9, 2024
319b7d5
Use ChatGPT service
kangaree Oct 9, 2024
1ea3047
Adding some columns
skduncan Oct 9, 2024
19d52b4
Merge branch 'set-projects-db-columns' into bootstrap-ai
skduncan Oct 9, 2024
a61d1af
Adding user input on initial project submit
skduncan Oct 9, 2024
720f642
Add fetchIteration that takes previous code
kangaree Oct 9, 2024
6ce6eb3
Add style to remove grid-template-areas
kangaree Oct 9, 2024
bbc9323
Sidebar Wip
markdoeswork Oct 9, 2024
f8f0b25
WIPv for code preview
nidaqg Oct 9, 2024
b51e615
Fix for Bad Import
jasperfurniss Oct 9, 2024
c07926d
Merge branch 'master' into bootstrap-ai
jasperfurniss Oct 9, 2024
157d010
guideline training initial
ElisaShapiro Oct 9, 2024
99e65aa
Fixes for component error
nidaqg Oct 9, 2024
c48c34c
Removed unused code
nidaqg Oct 9, 2024
397c3a0
lunch time
markdoeswork Oct 9, 2024
d0c12d9
Add condtional to nav bar
markdoeswork Oct 9, 2024
f639896
If you provide project stay on project
kangaree Oct 9, 2024
fd0cefa
Trainning chatgpt in how to give me code
carloslimasd Oct 9, 2024
706a1a2
Merge remote-tracking branch 'origin/bootstrap-ai' into bootstrap-ai
carloslimasd Oct 9, 2024
98493da
Added Logo
jasperfurniss Oct 9, 2024
7dd198e
a commit
markdoeswork Oct 9, 2024
d84d744
Merge branch 'bootstrap-ai' into sidebargooder
markdoeswork Oct 9, 2024
3e5550b
Fix merge conflicts
kangaree Oct 9, 2024
653c65e
Remove duplicate button
kangaree Oct 9, 2024
bd27dc2
Fix iteration api call
kangaree Oct 9, 2024
523d4da
Have a summary API call
kangaree Oct 9, 2024
73fc726
added top nav
nickamantia Oct 9, 2024
1f500e7
Changing dumb name
skduncan Oct 9, 2024
22ca7d1
Merge branch 'bootstrap-ai' of github.com:powerhome/playbook into boo…
skduncan Oct 9, 2024
8a2c345
Compare code
kangaree Oct 9, 2024
b229d17
Putting impotant code back
carloslimasd Oct 9, 2024
4ab9faf
updated sidebar input
ElisaShapiro Oct 9, 2024
b0c4313
Use latest message code and refresh
kangaree Oct 9, 2024
d8d7c68
Update iterate api call
kangaree Oct 9, 2024
7808f17
Go from root to undefined
kangaree Oct 9, 2024
ac4b38e
Adding scroll to the side nav
skduncan Oct 10, 2024
85d8408
topNav now renders again
nickamantia Oct 10, 2024
51832e3
Sidebar logo and icon
ElisaShapiro Oct 10, 2024
c67900d
Sidebar spacing and remove Playmaker response section if empty
ElisaShapiro Oct 10, 2024
78ffd71
loading animation from jasper pr
ElisaShapiro Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ clean:
changelog:
docker compose run web bundle exec github_changelog_generator

db:
docker compose up -d db

time-to-live ?= 3h
review_cluster = ${shell ./playbook-website/bin/deployer ./playbook-website/bin/cluster_for_review_stack pr$(pr)}

Expand Down
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,48 @@ services:
- bundle:/usr/local/bundle
ports:
- "8089:3000"
db:
platform: linux/x86_64
image: percona:8.0.27-18@sha256:f649b06357456689c24601fe919d585dce5b289c623bb547f84acc458c34c0d0
init: true
ports:
- "3306:3306" # Map the host port 3306 to the container port 3306
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: password
healthcheck:
test: ["CMD", "mysql", "-u", "root", "-ppassword", "-e", "SHOW DATABASES;"]
interval: 5s
timeout: 2s
retries: 5
start_period: 20s
networks:
- main
redis:
image: redis:7.4.0-alpine@sha256:c35af3bbcef51a62c8bae5a9a563c6f1b60d7ebaea4cb5a3ccbcc157580ae098
healthcheck:
test: ["CMD", "redis-cli", "PING"]
interval: 5s
timeout: 2s
retries: 5
start_period: 20s
ports:
- 6379
networks:
- main
influxdb:
image: influxdb:2.7.10@sha256:aac51f94d98041e591aa4a5f36294080dd7987c1033ff115febfab98adcda61d
container_name: influxdb
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: admin
DOCKER_INFLUXDB_INIT_PASSWORD: passwordpasswordpassword
DOCKER_INFLUXDB_INIT_ORG: web
DOCKER_INFLUXDB_INIT_BUCKET: app_data
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: influxdbwebtoken
ports:
- 8086:8086
networks:
- main
networks:
main:
15 changes: 8 additions & 7 deletions playbook-website/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@ ruby "3.3.0"

gem "playbook_ui", path: "../playbook"

gem "puma", "~> 6.3"
gem "rails", "~> 7.0.8"
gem "turbo-rails", "~> 1.4.0"
gem "puma", "~> 6.3"
gem "vite_rails"
# Make Compatible with Ruby 3.1.0 Upgrade
gem "psych", "< 4"
gem "bootsnap", ">= 1.1.0", require: false
gem "psych", "< 4"

# livenessProbe and readinessProbe. See: https://github.com/powerhome/playbook/blob/master/playbook/config/deploy/templates/deployment.yaml.erb
gem "health_check"

gem "faker"
gem "front_matter_parser", "~> 1.0.1"
gem "mysql2", "0.5.6"
gem "redcarpet", "~> 3.6"
gem 'front_matter_parser', "~> 1.0.1"
gem "rouge", "~> 3.15"
gem "faker"
gem "will_paginate"
gem "sentry-ruby"
gem "sentry-rails"
gem "sentry-ruby"
gem "will_paginate"

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem "byebug", platforms: %i[mri mingw x64_mingw]
gem "rspec-rails", '3.9.1'
gem "diff-lcs", "1.4.4"
gem "rails-controller-testing"
gem "rspec-rails", "3.9.1"
end

group :development do
Expand Down
2 changes: 2 additions & 0 deletions playbook-website/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ GEM
mini_mime (1.1.5)
minitest (5.25.1)
msgpack (1.7.2)
mysql2 (0.5.6)
net-imap (0.4.15)
date
net-protocol
Expand Down Expand Up @@ -332,6 +333,7 @@ DEPENDENCIES
front_matter_parser (~> 1.0.1)
health_check
listen
mysql2 (= 0.5.6)
playbook_ui!
psych (< 4)
puma (~> 6.3)
Expand Down
59 changes: 59 additions & 0 deletions playbook-website/app/controllers/messages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# frozen_string_literal: true

class MessagesController < ApplicationController
before_action :set_message, only: %i[show edit update destroy]

# GET /messages
def index
@messages = Message.all
end

# GET /messages/1
def show; end

# GET /messages/new
def new
@message = Message.new
end

# GET /messages/1/edit
def edit; end

# POST /messages
def create
@message = Message.new(message_params)

if @message.save
redirect_to @message, notice: "Message was successfully created."
else
render :new, status: :unprocessable_entity
end
end

# PATCH/PUT /messages/1
def update
if @message.update(message_params)
redirect_to @message, notice: "Message was successfully updated.", status: :see_other
else
render :edit, status: :unprocessable_entity
end
end

# DELETE /messages/1
def destroy
@message.destroy
redirect_to messages_url, notice: "Message was successfully destroyed.", status: :see_other
end

private

# Use callbacks to share common setup or constraints between actions.
def set_message
@message = Message.find(params[:id])
end

# Only allow a list of trusted parameters through.
def message_params
params.require(:message).permit(:project_id, :code, :user_input, :ai_response)
end
end
4 changes: 4 additions & 0 deletions playbook-website/app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def application_beta
end
end

def ai_assistant
redirect_to "/ai_assistant?project=undefined" if params[:project].nil?
end

def disable_dark_mode
cookies[:dark_mode] = {
value: "false",
Expand Down
64 changes: 64 additions & 0 deletions playbook-website/app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# frozen_string_literal: true

class ProjectsController < ApplicationController
before_action :set_project, only: %i[show edit update destroy]

# GET /projects
def index
@projects = Project.all
render json: @projects
end

# GET /projects/1
def show
render json: @project.messages
end

# GET /projects/new
def new
@project = Project.new
end

# GET /projects/1/edit
def edit; end

# POST /projects
def create
@project = Project.new(project_params)

if @project.save
# redirect_to @project, notice: "Project was successfully created."
puts @project
render json: @project
else
render :new, status: :unprocessable_entity
end
end

# PATCH/PUT /projects/1
def update
if @project.update(project_params)
redirect_to @project, notice: "Project was successfully updated.", status: :see_other
else
render :edit, status: :unprocessable_entity
end
end

# DELETE /projects/1
def destroy
@project.destroy
redirect_to projects_url, notice: "Project was successfully destroyed.", status: :see_other
end

private

# Use callbacks to share common setup or constraints between actions.
def set_project
@project = Project.find(params[:id])
end

# Only allow a list of trusted parameters through.
def project_params
params.require(:project).permit(:summary)
end
end
4 changes: 4 additions & 0 deletions playbook-website/app/helpers/messages_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

module MessagesHelper
end
4 changes: 4 additions & 0 deletions playbook-website/app/helpers/projects_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

module ProjectsHelper
end
Loading
Loading