MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isSessionContainerCompatible

Function isSessionContainerCompatible

src/hooks/useIssueFlagBanner.ts:45–72  ·  view source on GitHub ↗
(messages: Message[])

Source from the content-addressed store, hash-verified

43]
44
45export function isSessionContainerCompatible(messages: Message[]): boolean {
46 for (const msg of messages) {
47 if (msg.type !== 'assistant') {
48 continue
49 }
50 const content = msg.message.content
51 if (!Array.isArray(content)) {
52 continue
53 }
54 for (const block of content) {
55 if (block.type !== 'tool_use' || !('name' in block)) {
56 continue
57 }
58 const toolName = block.name as string
59 if (toolName.startsWith('mcp__')) {
60 return false
61 }
62 if (toolName === BASH_TOOL_NAME) {
63 const input = (block as { input?: Record<string, unknown> }).input
64 const command = (input?.command as string) || ''
65 if (EXTERNAL_COMMAND_PATTERNS.some(p => p.test(command))) {
66 return false
67 }
68 }
69 }
70 }
71 return true
72}
73
74export function hasFrictionSignal(messages: Message[]): boolean {
75 for (let i = messages.length - 1; i >= 0; i--) {

Callers 1

useIssueFlagBannerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected