aegon-dangerious 1.0.0

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.
Files changed (32) hide show
  1. package/build-report/components/AiPromptGenerateDialog.vue +349 -0
  2. package/build-report/components/CapsuleScrollbar.vue +145 -0
  3. package/build-report/components/ChapterTitleScroll.vue +292 -0
  4. package/build-report/components/PromptField.vue +314 -0
  5. package/build-report/components/RecentReportsTable.vue +408 -0
  6. package/build-report/components/ReportChapterPreview.vue +437 -0
  7. package/build-report/components/ReportChapterWorkspace.vue +923 -0
  8. package/build-report/components/ReportCollapsibleSection.vue +132 -0
  9. package/build-report/components/ReportConfigPanel.vue +609 -0
  10. package/build-report/components/ReportGenerateSettingsPanel.vue +403 -0
  11. package/build-report/components/ReportGeneratingPanel.vue +908 -0
  12. package/build-report/components/ReportHistoryList.vue +157 -0
  13. package/build-report/components/ReportHistoryPanel.vue +140 -0
  14. package/build-report/components/ReportPromptPanel.vue +445 -0
  15. package/build-report/components/ReportSectionConfirmPopover.vue +232 -0
  16. package/build-report/components/ReportSourceFileSummary.vue +544 -0
  17. package/build-report/components/ReportSourcesMoreOverlay.vue +279 -0
  18. package/build-report/components/ReportSourcesPanel.vue +1055 -0
  19. package/build-report/components/ReportTemplateDetail.vue +176 -0
  20. package/build-report/components/ReportTemplateEditorFormPanel.vue +602 -0
  21. package/build-report/components/ReportTemplatePicker.vue +802 -0
  22. package/build-report/components/ReportTemplatePromptField.vue +314 -0
  23. package/build-report/components/ReportWorkflowSidebar.vue +104 -0
  24. package/build-report/components/reportEdit.vue +334 -0
  25. package/build-report/index.vue +646 -0
  26. package/build-report/report-list.vue +407 -0
  27. package/build-report/report-template-data.ts +248 -0
  28. package/build-report/styles/report-workflow-dialog.css +33 -0
  29. package/build-report/useReportWorkflow.ts +343 -0
  30. package/build-report/utils/report-edit-route.ts +109 -0
  31. package/build-report/utils/scroll.ts +361 -0
  32. package/package.json +12 -0
@@ -0,0 +1,157 @@
1
+ <template>
2
+ <div class="report-history-list" :class="{ 'is-embedded': !showTitle }">
3
+ <div v-if="showTitle" class="report-history-list__title">{{ title }}</div>
4
+ <div class="report-history-list__items">
5
+ <div
6
+ v-for="item in items"
7
+ :key="item.key"
8
+ class="report-history-list__row"
9
+ :class="{ 'is-active': item.key === activeKey }"
10
+ @click="handleSelect(item.key)"
11
+ >
12
+ <span class="report-history-list__indicator" aria-hidden="true" />
13
+ <div class="report-history-list__item">
14
+ <div class="report-history-list__body">
15
+ <div class="report-history-list__item-title">{{ item.title }}</div>
16
+ <div class="report-history-list__meta">
17
+ {{ item.author }} {{ item.time }}
18
+ </div>
19
+ </div>
20
+ <MoreFilled
21
+ class="report-history-list__menu"
22
+ @click.stop="emit('menu-click', item)"
23
+ />
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script setup lang="ts">
31
+ import { MoreFilled } from '@element-plus/icons-vue'
32
+
33
+ export interface ReportHistoryItem {
34
+ key: string
35
+ title: string
36
+ author: string
37
+ time: string
38
+ }
39
+
40
+ withDefaults(
41
+ defineProps<{
42
+ title?: string
43
+ items: ReportHistoryItem[]
44
+ activeKey?: string
45
+ showTitle?: boolean
46
+ }>(),
47
+ {
48
+ title: '報告歷史',
49
+ activeKey: '',
50
+ showTitle: true,
51
+ },
52
+ )
53
+
54
+ const emit = defineEmits<{
55
+ 'update:activeKey': [key: string]
56
+ select: [key: string]
57
+ 'menu-click': [item: ReportHistoryItem]
58
+ }>()
59
+
60
+ function handleSelect(key: string) {
61
+ emit('update:activeKey', key)
62
+ emit('select', key)
63
+ }
64
+ </script>
65
+
66
+ <style scoped>
67
+ .report-history-list {
68
+ border-top: 1px solid #f0f0f0;
69
+ padding-top: 20px;
70
+ }
71
+
72
+ .report-history-list.is-embedded {
73
+ border-top: none;
74
+ padding-top: 0;
75
+ }
76
+
77
+ .report-history-list__title {
78
+ font-size: 13px;
79
+ font-weight: 600;
80
+ color: #1a1a1a;
81
+ margin-bottom: 12px;
82
+ }
83
+
84
+ .report-history-list__items {
85
+ display: flex;
86
+ flex-direction: column;
87
+ gap: 6px;
88
+ }
89
+
90
+ .report-history-list__row {
91
+ display: grid;
92
+ grid-template-columns: 4px minmax(0, 1fr);
93
+ column-gap: 10px;
94
+ align-items: stretch;
95
+ cursor: pointer;
96
+ }
97
+
98
+ .report-history-list__indicator {
99
+ width: 4px;
100
+ border-radius: 2px;
101
+ background: transparent;
102
+ align-self: center;
103
+ min-height: 36px;
104
+ transition: background 0.15s;
105
+ }
106
+
107
+ .report-history-list__row.is-active .report-history-list__indicator {
108
+ background: #c53355;
109
+ }
110
+
111
+ .report-history-list__item {
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: space-between;
115
+ gap: 10px;
116
+ padding: 12px 14px;
117
+ border-radius: 12px;
118
+ transition: background 0.15s;
119
+ }
120
+
121
+ .report-history-list__row.is-active .report-history-list__item {
122
+ background: #fdf0f3;
123
+ }
124
+
125
+ .report-history-list__row:not(.is-active):hover .report-history-list__item {
126
+ background: #fafafa;
127
+ }
128
+
129
+ .report-history-list__body {
130
+ flex: 1;
131
+ min-width: 0;
132
+ }
133
+
134
+ .report-history-list__item-title {
135
+ font-size: 13px;
136
+ font-weight: 600;
137
+ color: #1a1a1a;
138
+ line-height: 1.4;
139
+ }
140
+
141
+ .report-history-list__meta {
142
+ margin-top: 2px;
143
+ color: #999;
144
+ font-size: 12px;
145
+ line-height: 1.4;
146
+ }
147
+
148
+ .report-history-list__menu {
149
+ flex-shrink: 0;
150
+ width: 16px;
151
+ height: 16px;
152
+ font-size: 16px;
153
+ color: #c53355;
154
+ transform: rotate(90deg);
155
+ cursor: pointer;
156
+ }
157
+ </style>
@@ -0,0 +1,140 @@
1
+ <template>
2
+ <aside class="chatbot-report-panel chatbot-report-panel--history">
3
+ <div class="chatbot-report-panel__body">
4
+ <ReportCollapsibleSection v-model:open="historyOpen" title="報告歷史">
5
+ <div class="chatbot-report-history-list">
6
+ <div
7
+ v-for="item in reportHistory"
8
+ :key="item.key"
9
+ class="chatbot-report-history-row"
10
+ :class="{ 'is-active': item.key === activeHistoryKey }"
11
+ @click="activeHistoryKey = item.key"
12
+ >
13
+ <span class="chatbot-report-history-item__indicator" aria-hidden="true" />
14
+ <div class="chatbot-report-history-item">
15
+ <div class="chatbot-report-history-item__body">
16
+ <div class="chatbot-report-history-item__title">{{ item.title }}</div>
17
+ <div class="chatbot-report-history-item__meta">{{ item.author }} {{ item.time }}</div>
18
+ </div>
19
+ <MoreFilled class="chatbot-report-history-item__menu" @click.stop />
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </ReportCollapsibleSection>
24
+ </div>
25
+ </aside>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { MoreFilled } from '@element-plus/icons-vue'
30
+ import { ref } from 'vue'
31
+ import ReportCollapsibleSection from './ReportCollapsibleSection.vue'
32
+
33
+ interface ReportHistoryItem {
34
+ key: string
35
+ title: string
36
+ author: string
37
+ time: string
38
+ }
39
+
40
+ const historyOpen = ref(true)
41
+ const activeHistoryKey = ref('history-final')
42
+
43
+ const reportHistory = ref<ReportHistoryItem[]>([
44
+ { key: 'history-final', title: '定稿版本', author: '陳大文', time: '15min前' },
45
+ { key: 'history-v2', title: 'V2', author: '陳大文', time: '15min前' },
46
+ ])
47
+ </script>
48
+
49
+ <style scoped>
50
+ .chatbot-report-panel {
51
+ --report-border: #ebeef5;
52
+ display: flex;
53
+ flex-direction: column;
54
+ min-width: 0;
55
+ flex-shrink: 0;
56
+ box-sizing: border-box;
57
+ }
58
+
59
+ .chatbot-report-panel--history .chatbot-report-panel__body {
60
+ padding: 0;
61
+ border: 1px solid var(--report-border);
62
+ border-radius: 8px;
63
+ background: #fff;
64
+ box-sizing: border-box;
65
+ overflow: hidden;
66
+ }
67
+
68
+ .chatbot-report-panel__body > :deep(.report-collapsible-section) {
69
+ border: none;
70
+ border-radius: 0;
71
+ padding: 14px 16px;
72
+ }
73
+
74
+ .chatbot-report-panel__body > :deep(.report-collapsible-section__toggle) {
75
+ border-bottom: none;
76
+ padding-bottom: 14px;
77
+ }
78
+
79
+ .chatbot-report-panel__body > :deep(.report-collapsible-section.is-collapsed .report-collapsible-section__toggle) {
80
+ padding-bottom: 0;
81
+ }
82
+
83
+ .chatbot-report-history-list {
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: 6px;
87
+ }
88
+
89
+ .chatbot-report-history-row {
90
+ display: grid;
91
+ grid-template-columns: 4px minmax(0, 1fr);
92
+ column-gap: 10px;
93
+ align-items: stretch;
94
+ cursor: pointer;
95
+ }
96
+
97
+ .chatbot-report-history-item__indicator {
98
+ width: 4px;
99
+ border-radius: 2px;
100
+ background: transparent;
101
+ align-self: center;
102
+ min-height: 36px;
103
+ }
104
+
105
+ .chatbot-report-history-row.is-active .chatbot-report-history-item__indicator {
106
+ background: #c53355;
107
+ }
108
+
109
+ .chatbot-report-history-item {
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: space-between;
113
+ gap: 10px;
114
+ padding: 12px 14px;
115
+ border-radius: 12px;
116
+ }
117
+
118
+ .chatbot-report-history-row.is-active .chatbot-report-history-item {
119
+ background: #fdf0f3;
120
+ }
121
+
122
+ .chatbot-report-history-item__title {
123
+ font-size: 13px;
124
+ font-weight: 600;
125
+ color: #1a1a1a;
126
+ }
127
+
128
+ .chatbot-report-history-item__meta {
129
+ margin-top: 4px;
130
+ font-size: 12px;
131
+ color: #999;
132
+ }
133
+
134
+ .chatbot-report-history-item__menu {
135
+ width: 16px;
136
+ height: 16px;
137
+ color: #999;
138
+ flex-shrink: 0;
139
+ }
140
+ </style>