Merge branch 'feat/scenarios' into feat/scenario-tools-association

This commit is contained in:
Shivam Mishra
2025-07-11 15:52:58 +05:30
committed by GitHub
5 changed files with 49 additions and 7 deletions
@@ -0,0 +1,28 @@
<script setup>
import SettingsHeader from './SettingsHeader.vue';
</script>
<template>
<Story
title="Captain/PageComponents/SettingsHeader"
:layout="{ type: 'grid', width: '800px' }"
>
<Variant title="Default">
<div class="px-6 py-4 bg-n-background">
<SettingsHeader
heading="General Settings"
description="Configure general preferences for your workspace."
/>
</div>
</Variant>
<Variant title="Long Description">
<div class="px-6 py-4 bg-n-background">
<SettingsHeader
heading="Integrations"
description="Manage and configure third-party integrations such as Slack, Zapier, and Webhooks to enhance your workflow."
/>
</div>
</Variant>
</Story>
</template>
@@ -0,0 +1,19 @@
<script setup>
defineProps({
heading: {
type: String,
required: true,
},
description: {
type: String,
default: '',
},
});
</script>
<template>
<header class="flex flex-col items-start gap-2">
<h2 class="text-n-slate-12 text-base font-medium">{{ heading }}</h2>
<p class="text-n-slate-11 text-sm">{{ description }}</p>
</header>
</template>
@@ -6,7 +6,7 @@ class CreateCaptainScenarios < ActiveRecord::Migration[7.1]
t.text :instruction
t.jsonb :tools, default: []
t.boolean :enabled, default: true, null: false
t.references :assistant, null: false, foreign_key: { to_table: :captain_assistants }
t.references :assistant, null: false
t.references :account, null: false
t.timestamps
+1 -2
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2025_07_09_075622) do
ActiveRecord::Schema[7.1].define(version: 2025_07_10_145708) do
# These extensions should be enabled to support this database
enable_extension "pg_stat_statements"
enable_extension "pg_trgm"
@@ -1130,7 +1130,6 @@ ActiveRecord::Schema[7.1].define(version: 2025_07_09_075622) do
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "captain_scenarios", "captain_assistants", column: "assistant_id"
add_foreign_key "inboxes", "portals"
create_trigger("accounts_after_insert_row_tr", :generated => true, :compatibility => 1).
on("accounts").
@@ -20,10 +20,6 @@
# index_captain_scenarios_on_assistant_id_and_enabled (assistant_id,enabled)
# index_captain_scenarios_on_enabled (enabled)
#
# Foreign Keys
#
# fk_rails_... (assistant_id => captain_assistants.id)
#
class Captain::Scenario < ApplicationRecord
include CaptainToolsHelpers