Skip to content

Commit efd59e8

Browse files
committed
🔧 Misc
1 parent db22a43 commit efd59e8

27 files changed

Lines changed: 629 additions & 238 deletions

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ authors:
44
- family-names: 'Leymet'
55
given-names: 'Arnaud'
66
title: 'DEVS'
7-
version: 0.7.1
8-
date-released: 2026-03-05
7+
version: 0.7.2
8+
date-released: 2026-03-07
99
url: 'https://github.com/codename-co/devs'

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "devs",
33
"private": true,
4-
"version": "0.7.1",
4+
"version": "0.7.2",
55
"license": "MIT",
66
"type": "module",
77
"sideEffects": false,
@@ -104,4 +104,4 @@
104104
"vitest": "^3.2.4",
105105
"yaml": "^2.8.1"
106106
}
107-
}
107+
}

src/components/ArtifactCard.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const ArtifactCard = memo(
4444
return (
4545
<Card
4646
isPressable
47+
fullWidth
4748
onPress={handleOpen}
4849
shadow="none"
4950
className="border border-default-200 bg-default-50 hover:bg-default-100"
@@ -60,6 +61,7 @@ export const ArtifactCard = memo(
6061
Markdown
6162
</span>
6263
</div>
64+
<Icon name="NavArrowRight" size="md" className="text-default-500" />
6365
{/* <Button
6466
size="sm"
6567
variant="light"

src/components/InspectorPanel.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ const InspectorContent = memo(({ item }: { item: InspectorItem }) => {
101101
</Tooltip>
102102
)}
103103

104-
<div className="flex items-center gap-2 flex-1 min-w-0">
105-
<Icon name={icon} className="w-4 h-4 text-default-500 shrink-0" />
104+
<div className="flex items-center gap-4 px-4 h-14 max-w-full flex-1 min-w-0">
105+
<Icon name={icon} size="md" className="text-default-500" />
106106
<span className="text-sm font-medium truncate">{title}</span>
107107
</div>
108108

@@ -162,17 +162,17 @@ InspectorBody.displayName = 'InspectorBody'
162162

163163
const ArtifactBody = memo(
164164
({ artifact }: { artifact: import('@/types').Artifact }) => {
165-
const statusColor =
166-
artifact.status === 'approved' || artifact.status === 'final'
167-
? 'success'
168-
: artifact.status === 'rejected'
169-
? 'danger'
170-
: 'warning'
165+
// const statusColor =
166+
// artifact.status === 'approved' || artifact.status === 'final'
167+
// ? 'success'
168+
// : artifact.status === 'rejected'
169+
// ? 'danger'
170+
// : 'warning'
171171

172172
return (
173173
<div className="space-y-4">
174174
{/* Meta chips */}
175-
<div className="flex flex-wrap gap-2">
175+
{/* <div className="flex flex-wrap gap-2">
176176
<Chip size="sm" variant="flat" color={statusColor}>
177177
{artifact.status}
178178
</Chip>
@@ -182,11 +182,11 @@ const ArtifactBody = memo(
182182
<Chip size="sm" variant="flat" color="default">
183183
v{artifact.version}
184184
</Chip>
185-
</div>
185+
</div> */}
186186

187-
{artifact.description && (
187+
{/* {artifact.description && (
188188
<p className="text-sm text-default-600">{artifact.description}</p>
189-
)}
189+
)} */}
190190

191191
{/* Full content */}
192192
<div className="rounded-lg bg-default-50 dark:bg-default-100/30 p-4">

src/components/PromptArea/index.tsx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -538,11 +538,21 @@ export const PromptArea = forwardRef<HTMLTextAreaElement, PromptAreaProps>(
538538
(agent: Agent) => {
539539
const name = agent.i18n?.[lang]?.name ?? agent.name
540540
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
541+
const hyphenatedName = name
542+
.replace(/\s+/g, '-')
543+
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
541544
const noSpaceName = name.replace(/\s+/g, '')
542545
const newPrompt = prompt
543-
.replace(new RegExp(`(^|\\s)@\\[${escaped}\\]\\s?`, 'i'), '$1')
544-
.replace(new RegExp(`(^|\\s)@${noSpaceName}\\b\\s?`, 'i'), '$1')
545-
.replace(new RegExp(`(^|\\s)@${agent.id}\\b\\s?`, 'i'), '$1')
546+
.replace(new RegExp(`(^|\\s)@\\[${escaped}\\]\\s?`, 'iu'), '$1')
547+
.replace(
548+
new RegExp(`(^|\\s)@${hyphenatedName}(?=[\\s]|$)\\s?`, 'iu'),
549+
'$1',
550+
)
551+
.replace(
552+
new RegExp(`(^|\\s)@${noSpaceName}(?=[\\s]|$)\\s?`, 'iu'),
553+
'$1',
554+
)
555+
.replace(new RegExp(`(^|\\s)@${agent.id}(?=[\\s]|$)\\s?`, 'iu'), '$1')
546556
.replace(/\s+/g, ' ')
547557
.trim()
548558
handlePromptChange(newPrompt)
@@ -563,8 +573,8 @@ export const PromptArea = forwardRef<HTMLTextAreaElement, PromptAreaProps>(
563573
'\\$&',
564574
)
565575
const newPrompt = prompt
566-
.replace(new RegExp(`#${name}\\b\\s?`, 'i'), '')
567-
.replace(new RegExp(`#${id}\\b\\s?`, 'i'), '')
576+
.replace(new RegExp(`#${name}(?=[\\s]|$)\\s?`, 'iu'), '')
577+
.replace(new RegExp(`#${id}(?=[\\s]|$)\\s?`, 'iu'), '')
568578
.replace(/\s+/g, ' ')
569579
.trim()
570580
handlePromptChange(newPrompt)
@@ -580,8 +590,8 @@ export const PromptArea = forwardRef<HTMLTextAreaElement, PromptAreaProps>(
580590
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
581591
const id = skill.id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
582592
const newPrompt = prompt
583-
.replace(new RegExp(`(^|\\s)\\/${name}\\b\\s?`, 'i'), '$1')
584-
.replace(new RegExp(`(^|\\s)\\/${id}\\b\\s?`, 'i'), '$1')
593+
.replace(new RegExp(`(^|\\s)\\/${name}(?=[\\s]|$)\\s?`, 'iu'), '$1')
594+
.replace(new RegExp(`(^|\\s)\\/${id}(?=[\\s]|$)\\s?`, 'iu'), '$1')
585595
.replace(/\s+/g, ' ')
586596
.trim()
587597
handlePromptChange(newPrompt)
@@ -600,8 +610,11 @@ export const PromptArea = forwardRef<HTMLTextAreaElement, PromptAreaProps>(
600610
'\\$&',
601611
)
602612
const newPrompt = prompt
603-
.replace(new RegExp(`(^|\\s)\\/${name}\\b\\s?`, 'i'), '$1')
604-
.replace(new RegExp(`(^|\\s)\\/${provider}\\b\\s?`, 'i'), '$1')
613+
.replace(new RegExp(`(^|\\s)\\/${name}(?=[\\s]|$)\\s?`, 'iu'), '$1')
614+
.replace(
615+
new RegExp(`(^|\\s)\\/${provider}(?=[\\s]|$)\\s?`, 'iu'),
616+
'$1',
617+
)
605618
.replace(/\s+/g, ' ')
606619
.trim()
607620
handlePromptChange(newPrompt)

src/components/PromptArea/useAgentMention.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ interface AgentMentionResult {
2828
}
2929

3030
// Regex to detect @mentions while typing:
31-
// Matches @word-characters including hyphens and dots (spaces in agent names are auto-replaced with "-")
32-
const MENTION_REGEX = /@([\w.-]*)$/
31+
// Matches @word-characters including hyphens, dots, and Unicode letters (spaces in agent names are auto-replaced with "-")
32+
const MENTION_REGEX = /@([\p{L}\p{N}\w.-]*)$/u
3333

3434
export function useAgentMention({
3535
lang,
@@ -159,7 +159,7 @@ export function useAgentMention({
159159
const mentions: Agent[] = []
160160

161161
// Extract @hyphenated-name mentions
162-
const mentionMatches = prompt.matchAll(/(^|[\s])@([\w.-]+)/g)
162+
const mentionMatches = prompt.matchAll(/(^|[\s])@([\p{L}\p{N}\w.-]+)/gu)
163163
for (const match of mentionMatches) {
164164
const mentionName = match[2].toLowerCase()
165165
const agent = availableAgents.find((a) => {
@@ -184,7 +184,7 @@ export function useAgentMention({
184184
const removeMentionsFromPrompt = useCallback((text: string): string => {
185185
// Replace @hyphenated-name mentions with empty string, cleaning up extra spaces
186186
return text
187-
.replace(/(^|[\s])@[\w.-]+\s*/g, '$1')
187+
.replace(/(^|[\s])@[\p{L}\p{N}\w.-]+\s*/gu, '$1')
188188
.replace(/\s+/g, ' ')
189189
.trim()
190190
}, [])

src/components/Tabbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const Tabbar = ({ className = '' }) => {
5555
key="/"
5656
// data-color="primary"
5757
title={
58-
<Tooltip content={t('New chat')} placement="top">
58+
<Tooltip content={t('New Task')} placement="top">
5959
<Icon name="PlusCircleSolid" size="lg" />
6060
</Tooltip>
6161
}

0 commit comments

Comments
 (0)