-
Notifications
You must be signed in to change notification settings - Fork 648
feat(uikit): add new think content block #947
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| <!-- eslint-disable vue/no-v-html --> | ||
| <template> | ||
| <div | ||
| class="text-xs leading-4 text-[rgba(37,37,37,0.5)] dark:text-white/50 flex flex-col gap-[6px]" | ||
| > | ||
| <div | ||
| class="inline-flex items-center gap-[10px] cursor-pointer select-none self-start" | ||
| @click="$emit('toggle')" | ||
| > | ||
| <span class="whitespace-nowrap">{{ label }}</span> | ||
| <Icon | ||
| v-if="thinking && !expanded" | ||
| icon="lucide:ellipsis" | ||
| class="w-[14px] h-[14px] text-[rgba(37,37,37,0.5)] dark:text-white/50 animate-pulse" | ||
| /> | ||
| <Icon | ||
| v-else-if="expanded" | ||
| icon="lucide:chevron-down" | ||
| class="w-[14px] h-[14px] text-[rgba(37,37,37,0.5)] dark:text-white/50" | ||
| /> | ||
| <Icon | ||
| v-else | ||
| icon="lucide:chevron-right" | ||
| class="w-[14px] h-[14px] text-[rgba(37,37,37,0.5)] dark:text-white/50" | ||
| /> | ||
| </div> | ||
|
|
||
| <div v-show="expanded" class="w-full relative"> | ||
| <div class="think-prose w-full max-w-full mt-[6px]" v-html="contentHtml"></div> | ||
| </div> | ||
|
|
||
| <Icon | ||
| v-if="thinking && expanded" | ||
| icon="lucide:ellipsis" | ||
| class="w-[14px] h-[14px] text-[rgba(37,37,37,0.5)] dark:text-white/50 animate-pulse" | ||
| /> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { Icon } from '@iconify/vue' | ||
|
|
||
| defineProps<{ | ||
| label: string | ||
| expanded: boolean | ||
| thinking: boolean | ||
| contentHtml?: string | ||
| }>() | ||
|
|
||
| defineEmits<{ | ||
| (e: 'toggle'): void | ||
| }>() | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| .think-prose :where(p, li, ol, ul) { | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| letter-spacing: 0; | ||
| color: rgba(37, 37, 37, 0.5); | ||
| } | ||
| .think-prose :where(ol, ul) { | ||
| padding-left: 1.5em; | ||
| } | ||
| .think-prose :where(p, li, ol, ul) :where(a) { | ||
| color: rgba(37, 37, 37, 0.6); | ||
| text-decoration: underline; | ||
| } | ||
| .dark .think-prose :where(p, li, ol, ul) { | ||
| color: rgba(255, 255, 255, 0.5); | ||
| } | ||
| .dark .think-prose :where(p, li, ol, ul) :where(a) { | ||
| color: rgba(255, 255, 255, 0.6); | ||
| } | ||
| </style> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { default as ThinkContent } from './ThinkContent.vue' |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,11 +19,10 @@ | |||||||||||||||||||||||||||||
| "rateLimitWaitingTooltip": "{seconds}초 더 대기, 간격 {interval}초" | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| "features": { | ||||||||||||||||||||||||||||||
| "deepThinking": "심층 사고", | ||||||||||||||||||||||||||||||
| "webSearch": "웹 검색", | ||||||||||||||||||||||||||||||
| "deepThinkingProgress": "심층 사고 진행 중...", | ||||||||||||||||||||||||||||||
| "thinkingDuration": "({0}초 소요)", | ||||||||||||||||||||||||||||||
| "artifactThinking": "아티팩트 추론" | ||||||||||||||||||||||||||||||
| "artifactThinking": "아티팩트 추론", | ||||||||||||||||||||||||||||||
| "thoughtForSeconds": "{seconds}초 동안 생각했습니다", | ||||||||||||||||||||||||||||||
| "thoughtForSecondsLoading": "{seconds}초째 생각 중..." | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
|
Comment on lines
22
to
26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix placeholder keys for new “thought” strings - "artifactThinking": "아티팩트 추론",
- "thoughtForSeconds": "생각 {초} 초",
- "thoughtForSecondsLoading": "사고 ({초} 초)"
+ "artifactThinking": "아티팩트 추론",
+ "thoughtForSeconds": "생각 {seconds}초",
+ "thoughtForSecondsLoading": "생각 중 ({seconds}초)"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| "search": { | ||||||||||||||||||||||||||||||
| "results": "{0}개의 웹 페이지를 찾았습니다", | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the toggle control keyboard accessible
The header is a
<div>with a click handler, so it can’t be focused or activated via keyboard. Users depending on keyboard or assistive tech won’t be able to expand/collapse the block. Please use a semantic button (or add the necessary role/tabindex/keyboard handlers).📝 Committable suggestion
🤖 Prompt for AI Agents