Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
ai-practical-training
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dc96393b
authored
May 19, 2026
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.8.0' into 'master'
上线合并 See merge request
!2
2 parents
b08920e4
3cabb99f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
11 deletions
app/components/base/chat/chat/footer/components/input/wrapper.tsx
app/components/base/chat/chat/footer/components/voice-input/index.tsx
app/components/base/chat/chat/footer/context/voice-input-context.tsx
app/components/base/chat/constants.ts
app/components/base/voice-input/index.tsx
app/layout.tsx
app/components/base/chat/chat/footer/components/input/wrapper.tsx
View file @
dc96393
...
@@ -4,15 +4,11 @@ import { useFileOperation } from '../../hooks'
...
@@ -4,15 +4,11 @@ import { useFileOperation } from '../../hooks'
import TextInput from './text-input'
import TextInput from './text-input'
import Opration from '../operation'
import Opration from '../operation'
import MultipleLineOperation from './multiple-line-operation'
import MultipleLineOperation from './multiple-line-operation'
import VoiceInput from '../voice-input'
import s from './wrapper.module.scss'
import s from './wrapper.module.scss'
const InputWrapper: FC = () => {
const InputWrapper: FC = () => {
const { isDragActive } = useFileOperation()
const { isDragActive } = useFileOperation()
return (
return (
// <div
// className={cn(
// 'relative z-10 rounded-xl border border-components-chat-input-border bg-[#fff] pb-[9px] shadow-md',
// isDragActive && 'border border-dashed border-components-option-card-option-selected-border',
// )}>
<div
<div
className={cn(
className={cn(
s['input-wrapper'],
s['input-wrapper'],
...
@@ -23,7 +19,7 @@ const InputWrapper: FC = () => {
...
@@ -23,7 +19,7 @@ const InputWrapper: FC = () => {
<TextInput>
<TextInput>
<Opration />
<Opration />
</TextInput>
</TextInput>
{/* <VoiceInput /> */}
<VoiceInput />
</div>
</div>
<MultipleLineOperation />
<MultipleLineOperation />
</div>
</div>
...
...
app/components/base/chat/chat/footer/components/voice-input/index.tsx
View file @
dc96393
...
@@ -13,7 +13,7 @@ const Voice: FC = () => {
...
@@ -13,7 +13,7 @@ const Voice: FC = () => {
setQuery(text)
setQuery(text)
requestAnimationFrame(handleTextareaResize)
requestAnimationFrame(handleTextareaResize)
}, [])
}, [])
//
if (!showVoiceInput) return null
if (!showVoiceInput) return null
setQuery('')
setQuery('')
return <VoiceInput onCancel={() => setShowVoiceInput(false)} onConverted={onConverted} />
return <VoiceInput onCancel={() => setShowVoiceInput(false)} onConverted={onConverted} />
}
}
...
...
app/components/base/chat/chat/footer/context/voice-input-context.tsx
View file @
dc96393
...
@@ -25,7 +25,7 @@ export const VoiceInputProvider = ({ children }: { children: ReactNode }) => {
...
@@ -25,7 +25,7 @@ export const VoiceInputProvider = ({ children }: { children: ReactNode }) => {
showVoiceInput,
showVoiceInput,
setShowVoiceInput,
setShowVoiceInput,
}),
}),
[showVoiceInput],
[showVoiceInput
, setShowVoiceInput
],
)
)
useEffect(() => postMessage({ isRecording: showVoiceInput }), [showVoiceInput])
useEffect(() => postMessage({ isRecording: showVoiceInput }), [showVoiceInput])
return <VoiceInputContext.Provider value={value}>{children}</VoiceInputContext.Provider>
return <VoiceInputContext.Provider value={value}>{children}</VoiceInputContext.Provider>
...
...
app/components/base/chat/constants.ts
View file @
dc96393
...
@@ -15,7 +15,7 @@ const __DEFAULT_AI = 'https://img01.glsx.com.cn/weapp/resource/saas/ai/ai-avatar
...
@@ -15,7 +15,7 @@ const __DEFAULT_AI = 'https://img01.glsx.com.cn/weapp/resource/saas/ai/ai-avatar
const
__DEFAULT_USER
=
'https://img02.glsx.com.cn/weapp/resource/saas/ai/user-avatar.png'
const
__DEFAULT_USER
=
'https://img02.glsx.com.cn/weapp/resource/saas/ai/user-avatar.png'
export
const
AVATAR_AI_URL
=
__params
.
get
(
'avatar_ai'
)
||
__params
.
get
(
'ai_avatar'
)
||
__DEFAULT_AI
export
const
AVATAR_AI_URL
=
__params
.
get
(
'avatar_ai'
)
||
__params
.
get
(
'ai_avatar'
)
||
__DEFAULT_AI
export
const
AVATAR_USER_URL
=
__params
.
get
(
'avatar_user'
)
||
__params
.
get
(
'user_avatar'
)
||
__params
.
get
(
'avatar'
)
||
__DEFAULT_USER
export
const
AVATAR_USER_URL
=
__params
.
get
(
'avatar_user'
)
||
__params
.
get
(
'user_avatar'
)
||
__params
.
get
(
'avatar'
)
||
__DEFAULT_USER
export
const
MAIN_TITLE
=
'
AI智能问数
'
export
const
MAIN_TITLE
=
'
实战对练室
'
// export const SELF_INPUT = '0'
// export const SELF_INPUT = '0'
// export const AUTO_INPUT = '1'
// export const AUTO_INPUT = '1'
export
const
SEND_BUTTON
=
'https://img02.glsx.com.cn/weapp/resource/saas/ai/ai-send.png'
export
const
SEND_BUTTON
=
'https://img02.glsx.com.cn/weapp/resource/saas/ai/ai-send.png'
...
...
app/components/base/voice-input/index.tsx
View file @
dc96393
...
@@ -181,7 +181,7 @@ const VoiceInput = ({ onCancel, onConverted, wordTimestamps }: VoiceInputTypes)
...
@@ -181,7 +181,7 @@ const VoiceInput = ({ onCancel, onConverted, wordTimestamps }: VoiceInputTypes)
const seconds = originDuration % 60
const seconds = originDuration % 60
return (
return (
<div className={cn(s.wrapper, 'absolute inset-0 rounded-xl')}>
<div className={cn(s.wrapper, 'absolute inset-0 rounded-xl
z-10
')}>
{/* <div className="absolute inset-[1.5px] flex items-center overflow-hidden rounded-[10.5px] bg-primary-25 py-[14px] pl-[14.5px] pr-[6.5px]"></div> */}
{/* <div className="absolute inset-[1.5px] flex items-center overflow-hidden rounded-[10.5px] bg-primary-25 py-[14px] pl-[14.5px] pr-[6.5px]"></div> */}
<div className="absolute inset-[1.5px] flex items-center overflow-hidden rounded-[10.5px] bg-primary-25 pl-[14.5px] pr-[6.5px]">
<div className="absolute inset-[1.5px] flex items-center overflow-hidden rounded-[10.5px] bg-primary-25 pl-[14.5px] pr-[6.5px]">
<canvas id="voice-input-record" className="absolute bottom-0 left-0 h-4 w-full" />
<canvas id="voice-input-record" className="absolute bottom-0 left-0 h-4 w-full" />
...
...
app/layout.tsx
View file @
dc96393
...
@@ -15,7 +15,7 @@ import './styles/globals.css'
...
@@ -15,7 +15,7 @@ import './styles/globals.css'
import './styles/markdown.scss'
import './styles/markdown.scss'
export const metadata = {
export const metadata = {
title: '
AI智能问数
',
title: '
实战对练室
',
icons: {
icons: {
icon: '/favicon.ico',
icon: '/favicon.ico',
shortcut: '/favicon.ico',
shortcut: '/favicon.ico',
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment